Extensible query interface for dynamic data compositions and filter applications

ABSTRACT

A request to filter information associated with activities within a network environment is received in response to a user interaction with a graph that comprises a plurality of nodes. At least one node included in the graph is associated with an activity within a network environment. As one example, the request to filter is triggered by a user interaction with a visual representation of at least a portion of the graph. As another example, the request to filter is triggered by a user interaction with a query field. In response to receiving the filter request, a query is generated based on an implicit join using a query service.

CROSS REFERENCE TO OTHER APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/134,806 entitled EXTENSIBLE QUERY INTERFACE FOR DYNAMIC DATACOMPOSITIONS AND FILTER APPLICATIONS filed Sep. 18, 2018, which claimspriority to U.S. Provisional Patent Application No. 62/590,986 entitledUSING GRAPH-BASED MODELS TO IDENTIFY ANOMALIES filed Nov. 27, 2017, andalso claims priority to U.S. Provisional Patent Application No.62/650,971 entitled USING GRAPH-BASED MODELS TO IDENTIFY ANOMALIES filedMar. 30, 2018, all of which applications are incorporated herein byreference for all purposes.

BACKGROUND OF THE INVENTION

Businesses and other entities often make use of datacenters to provide avariety of computing resources. Increasingly, those resources are beingvirtualized. Such virtualization can provide benefits, such as efficientscalability and redundancy benefits. Unfortunately, such virtualizationcan also make it more difficult to detect and mitigate intruders (andother nefarious individuals). As one example, while the dynamic natureof modern datacenters provides flexibility, it also increases thecomplexity of collecting, analyzing, and surfacing information aboutdatacenter operations. Such complexity is exasperated as data volumeincreases.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of the invention are disclosed in the followingdetailed description and the accompanying drawings.

FIG. 1 illustrates an example of an environment in which activities thatoccur within datacenters are modeled.

FIG. 2 illustrates an example of a process, used by an agent, to collectand report information about a client.

FIG. 3A illustrates an example of static information collected by anagent.

FIG. 3B illustrates an example of variable information collected by anagent.

FIG. 3C illustrates an example of histogram data.

FIG. 3D illustrates an example of histogram data.

FIG. 4 illustrates a 5-tuple of data collected by an agent, physicallyand logically.

FIG. 5 illustrates a portion of a polygraph.

FIG. 6 illustrates a portion of a polygraph.

FIG. 7 illustrates an example of a communication polygraph.

FIG. 8 illustrates an example of a polygraph.

FIG. 9 illustrates an example of a polygraph as rendered in aninterface.

FIG. 10 illustrates an example of a portion of a polygraph as renderedin an interface.

FIG. 11 illustrates an example of a portion of a polygraph as renderedin an interface.

FIG. 12 illustrates an example of a portion of a polygraph as renderedin an interface.

FIG. 13 illustrates an example of a portion of a polygraph as renderedin an interface.

FIG. 14 illustrates an example of an insider behavior graph as renderedin an interface.

FIG. 15 illustrates an example of a privilege change graph as renderedin an interface.

FIG. 16 illustrates an example of a user login graph as rendered in aninterface.

FIG. 17 illustrates an example of a machine server graph as rendered inan interface.

FIG. 18 illustrates an example of a process for detecting anomalies in anetwork environment.

FIG. 19A depicts a set of example processes communicating with otherprocesses.

FIG. 19B depicts a set of example processes communicating with otherprocesses.

FIG. 19C depicts a set of example processes communicating with otherprocesses.

FIG. 19D depicts two pairs of clusters.

FIG. 20 is a representation of a user logging into a first machine, theninto a second machine from the first machine, and then making anexternal connection.

FIG. 21 is an alternate representation of actions occurring in FIG. 20.

FIG. 22 illustrates an example of a process for performing extended usertracking.

FIG. 23 is a representation of a user logging into a first machine, theninto a second machine from the first machine, and then making anexternal connection.

FIG. 24 illustrates an example of a process for performing extended usertracking.

FIG. 25A illustrates example records.

FIG. 25B illustrates example output from performing an ssh connectionmatch.

FIG. 25C illustrates example records.

FIG. 25D illustrates example records.

FIG. 25E illustrates example records.

FIG. 25F illustrates example records.

FIG. 25G illustrates an adjacency relationship between two loginsessions.

FIG. 25H illustrates example records.

FIG. 26 illustrates an example of a process for detecting anomalies.

FIG. 27A illustrates a representation of an embodiment of an insiderbehavior graph.

FIG. 27B illustrates an embodiment of a portion of an insider behaviorgraph.

FIG. 28A illustrates an embodiment of a portion of an insider behaviorgraph.

FIG. 28B illustrates an embodiment of a portion of an insider behaviorgraph.

FIG. 29 illustrates a representation of an embodiment of a user logingraph.

FIG. 30 illustrates a representation of a process tree.

FIG. 31 illustrates an example of a privilege change graph.

FIG. 32 illustrates an example of a privilege change graph.

FIG. 33 illustrates an example of a user interacting with a portion ofan interface.

FIG. 34 illustrates an example of a dossier for an event.

FIG. 35 illustrates an example of a dossier for a domain.

FIG. 36 illustrates an example of a card specification.

FIG. 37 illustrates an example of three user tracking data sources.

FIG. 38 depicts an example of card schema introspection.

FIG. 39 depicts an example of card schema introspection.

FIG. 40 depicts an example of an Entity Join Graph by FilterKey andFilterKey Group (implicit join).

FIG. 41 depicts an example introspection corresponding to the carddepicted in FIG. 36.

FIG. 42 depicts an example query service log for a join path search.

FIG. 43 depicts an example of dynamically generated SQL.

FIG. 44 illustrates an example introspection corresponding to FIG. 37.

FIG. 45 depicts an example query service log for a join path search.

FIG. 46 depicts an example of dynamically generated SQL.

FIG. 47A depicts a filter request.

FIG. 47B depicts an SQL translation.

FIG. 47C depicts a join.

FIG. 47D depicts an SQL translation.

FIG. 48 illustrates an example of a process for dynamically generatingand executing a query.

FIG. 49A illustrates a portion of a query builder library.

FIG. 49B illustrates three examples of SQL entities.

FIGS. 50A and 50B illustrate portions of an embodiment of aProcessClusterFilters definition.

FIG. 51 illustrates an example of an introspection corresponding to aProcessClusterFilters request.

FIG. 52A illustrates an example of a base table card.

FIG. 52B illustrates an example of a filter request.

FIG. 52C illustrates an example of a dynamically generated SQL query.

FIG. 52D illustrates an example of a filter request.

FIG. 52E illustrates an example of a dynamically generated SQL query.

FIG. 53A illustrates a card.

FIG. 53B illustrates a request.

FIG. 53C illustrates a dynamically generated SQL query.

FIG. 53D illustrates a request.

FIG. 53E illustrates a dynamically generated SQL query.

DETAILED DESCRIPTION

The invention can be implemented in numerous ways, including as aprocess; an apparatus; a system; a composition of matter; a computerprogram product embodied on a computer readable storage medium; and/or aprocessor, such as a processor configured to execute instructions storedon and/or provided by a memory coupled to the processor. In thisspecification, these implementations, or any other form that theinvention may take, may be referred to as techniques. In general, theorder of the steps of disclosed processes may be altered within thescope of the invention. Unless stated otherwise, a component such as aprocessor or a memory described as being configured to perform a taskmay be implemented as a general component that is temporarily configuredto perform the task at a given time or a specific component that ismanufactured to perform the task. As used herein, the term ‘processor’refers to one or more devices, circuits, and/or processing coresconfigured to process data, such as computer program instructions.

A detailed description of one or more embodiments of the invention isprovided below along with accompanying figures that illustrate theprinciples of the invention. The invention is described in connectionwith such embodiments, but the invention is not limited to anyembodiment. The scope of the invention is limited only by the claims andthe invention encompasses numerous alternatives, modifications andequivalents. Numerous specific details are set forth in the followingdescription in order to provide a thorough understanding of theinvention. These details are provided for the purpose of example and theinvention may be practiced according to the claims without some or allof these specific details. For the purpose of clarity, technicalmaterial that is known in the technical fields related to the inventionhas not been described in detail so that the invention is notunnecessarily obscured.

A detailed description of one or more embodiments of the invention isprovided below along with accompanying figures that illustrate theprinciples of the invention. The invention is described in connectionwith such embodiments, but the invention is not limited to anyembodiment. The scope of the invention is limited only by the claims andthe invention encompasses numerous alternatives, modifications andequivalents. Numerous specific details are set forth in the followingdescription in order to provide a thorough understanding of theinvention. These details are provided for the purpose of example and theinvention may be practiced according to the claims without some or allof these specific details. For the purpose of clarity, technicalmaterial that is known in the technical fields related to the inventionhas not been described in detail so that the invention is notunnecessarily obscured.

FIG. 1 illustrates an example of an environment in which activities thatoccur within datacenters are modeled. Using techniques described herein,a baseline of datacenter activity can be modeled, and deviations fromthat baseline can be identified as anomalous. Anomaly detection can bebeneficial in a security context, and can also be useful in othercontexts, such as devops.

Two example datacenters (104 and 106) are shown in FIG. 1, and belong tofictional companies ACME and BETA, respectively. A datacenter cancomprise dedicated equipment (e.g., owned and operated by ACME, orowned/leased by ACME and operated exclusively on ACME's behalf by athird party). A datacenter can also comprise cloud-based resources, suchas infrastructure as a service (IaaS), platform as a service (PaaS),and/or software as a service (SaaS) elements. The techniques describedherein can be used in conjunction with multiple types of datacenters,including ones wholly using dedicated equipment, ones that are entirelycloud-based, and ones that use a mixture of both dedicated equipment andcloud-based resources.

Both datacenter 104 and datacenter 106 include a plurality of nodes,depicted collectively as set of nodes 108 and set of nodes 110,respectively, in FIG. 1. Installed on each of the nodes arein-server/in-virtual machine (VM)/embedded in IoT device agents (asapplicable), which are configured to collect data and report it toplatform 102 for analysis. Agents are small, self-contained binariesthat can be run on any appropriate platforms, including virtualized ones(and, as applicable, within containers). Agents monitor the nodes onwhich they execute for a variety of different activities, including:connection, process, user, machine, and file activities. Agents can beexecuted in user space, and can use a variety of kernel modules (e.g.,auditd, iptables, netfilter, pcap, etc.) to collect data. Agents can beimplemented in any appropriate programming language, such as C orGolang, using applicable kernel APIs.

As will be described in more detail below, agents can selectively reportinformation to platform 102 in varying amounts of detail and/or withvariable frequency. As will also be described in more detail below, thedata collected by agents is used by platform 102 to create polygraphs,which are graphs of logical entities, connected by behaviors. In someembodiments, agents report information directly to platform 102. Inother embodiments, at least some agents provide information to a dataaggregator, such as data aggregator 114, which in turn providesinformation to platform 102. The functionality of a data aggregator canbe implemented as a separate binary or other application (distinct froman agent binary), and can also be implemented by having an agent executein an “aggregator mode” in which the designated aggregator node acts asa Layer 7 proxy for other agents that do not have access to platform102. Further, a chain of multiple aggregators can be used, if applicable(e.g., with agent 112 providing data to data aggregator 114, which inturn provides data to another aggregator (not pictured) which providesdata to platform 102). An example way to implement an aggregator isthrough a program written in an appropriate language, such as C orGolang.

Use of an aggregator can be beneficial in sensitive environments (e.g.,involving financial or medical transactions) where various nodes aresubject to regulatory or other architectural requirements (e.g.,prohibiting a given node from communicating with systems outside ofdatacenter 104). And, use of an aggregator can help to minimize securityexposure more generally. As one example, by limiting communications withplatform 102 to data aggregator 114, individual nodes in group 108 neednot make external network connections (e.g., via Internet 124), whichcan potentially expose them to compromise (e.g., by other externaldevices, such as device 118, operated by a criminal). Similarly,platform 102 can provide updates, configuration information, etc., todata aggregator 114 (which in turn distributes them to nodes 108),rather than requiring nodes 108 to allow incoming connections fromplatform 102 directly.

Another benefit of an aggregator model is that network congestion can bereduced (e.g., with a single connection being made at any given timebetween data aggregator 114 and platform 102, rather than potentiallymany different connections being open between various of nodes 108 andplatform 102). Similarly, network consumption can also be reduced (e.g.,with the aggregator applying compression techniques/bundling datareceived from multiple agents).

One example way that an agent (e.g., agent 112, installed on node 116)can provide information to data aggregator 114 is via a REST API,formatted using data serialization protocols such as Apache Avro. Oneexample type of information sent by agent 112 to data aggregator 114 isstatus information. Status information is sent periodically (e.g., oncean hour) and includes (in various embodiments): a. an amount of eventbacklog (in bytes) that has not yet been transmitted, b. configurationinformation, c. any data loss period for which data was dropped, d. acumulative count of errors encountered since the agent started, e.version information for the agent binary, and f. cumulative statisticson data collection (e.g., number of network packets processed, newprocesses seen, etc.). A second example type of information sent byagent 112 to data aggregator 114 is event data (described in more detailbelow), which includes a UTC timestamp for each event. As applicable,the agent can control the amount of data that it sends to the dataaggregator in each call (e.g., a maximum of 10 MB) by adjusting theamount of data sent to manage the conflicting goals of transmitting dataas soon as possible, and maximizing throughput. Data can also becompressed or uncompressed by the agent (as applicable) prior to sendingthe data.

Each data aggregator runs within a customer environment. A dataaggregator (e.g., data aggregator 114) facilitates data routing frommany different agents (e.g., agents executing on nodes 108) to platform102. In various embodiments, data aggregator 114 implements a SOCKS 5caching proxy through which agents can connect to platform 102. Asapplicable, data aggregator 114 can encrypt (or otherwise obfuscate)sensitive information prior to transmitting it to platform 102, and canalso distribute key material to agents which can encrypt the information(as applicable). Data aggregator 114 includes a local storage, to whichagents can upload data (e.g., pcap packets). The storage has a key-valueinterface. The local storage can also be omitted, and agents configuredto upload data to a cloud storage or other storage area, as applicable.Data aggregator 114 can also cache locally and distribute softwareupgrades, patches, or configuration information (e.g., as received fromplatform 102).

I. Agent Data Collection and Reporting

A. Initial Configuration

In the following example, suppose that a network administrator at ACME(hereinafter “Alice”) has decided to begin using the services ofplatform 102. In some embodiments, Alice accesses a web frontend (e.g.,web app 120) using her computer (126) and enrolls (on behalf of ACME) anaccount with platform 102. After enrollment is complete, Alice ispresented with a set of installers, pre-built and customized for theACME environment, that she can download from platform 102 and deploy onnodes 108. Examples of such installers include: a Windows executablefile; an iOS app; and a Linux package (e.g., .deb or .rpm), binary, orDocker container. When a network administrator at BETA (hereinafter“Bob”) also signs up for the services of platform 102, he will similarlybe presented with a set of installers that are pre-built and customizedfor the BETA environment.

Alice deploys an appropriate installer on each of nodes 108 (e.g., witha Windows executable file deployed on a Windows-based platform, and aLinux package deployed on a Linux platform, as applicable). Asapplicable, the agent can be deployed in a container. Agent deploymentcan also be performed using one or more appropriate automation tools,such as Chef, Puppet, Salt, and Ansible. Deployment can also beperformed using managed/hosted container management/orchestrationframeworks such as Kubernetes, mesos, and Docker swarm.

In various embodiments, the agent is installed in the user space (i.e.,is not a kernel module), and the same binary is executed on each node ofthe same type (e.g., all Windows-based platforms have the sameWindows-based binary installed on them). The primary job of an agent,such as agent 112, is to collect data (e.g., associated with node 116)and report it (e.g., to data aggregator 114). Other tasks that can beperformed by agents include data configuration and upgrading.

B. Data Collection

One approach to collecting data is to collect virtually all informationavailable about a node (and, e.g., the processes running on it). Adownside of this approach is that collecting information can be resourceintensive (i.e., requiring potentially large amounts of processor,network, and storage resources). Another downside of this approach isthat it can result in the collection of private or other sensitiveinformation that can be difficult to filter/exclude from downstreamreporting. An alternate approach is for the agent to monitor for networkconnections, and then begin collecting information about those processesassociated with the network connections, using the presence of a networkpacket associated with a process as a trigger for collecting additionalinformation about the process. As an example, if a user of node 116executes an application, such as a calculator application, which doesnot typically interact with the network, no information about use ofthat application is collected by agent 112/sent to data aggregator 114.If, however, the user of node 116 executes an ssh command (e.g., to sshfrom node 116 to node 122), agent 112 will collect information about theprocess and provide associated information to data aggregator 114. Invarious embodiments, the agent always collects/reports information aboutcertain events, such as privilege escalation, irrespective of whetherthe event is associated with network activity.

An approach to collecting information (e.g., by an agent) is as follows,and described in conjunction with process 200 depicted in FIG. 2. Anagent (e.g., agent 112) monitors its node (e.g., node 116) for networkactivity. One example way that agent 112 can monitor node 116 fornetwork activity is by using a network packet capture tool (e.g.,listening using libpcap). As packets are received (202), the agentobtains and maintains (e.g., in an in memory cache) connectioninformation associated with the network activity (204). Examples of suchinformation include DNS query/response, TCP, UDP, and IP information.

The agent also determines a process associated with the networkconnection (206). One example approach is for the agent to use a kernelnetwork diagnostic API (e.g., netlink_diag) to obtain inode/processinformation from the kernel. Another example approach is for the agentto scan using netstat (e.g., on /proc/net/tcp, /proc/net/tcp6,/proc/net/udp, and /proc/net/udp6) to obtain sockets and relate them toprocesses. Information such as socket state (e.g., whether a socket isconnected, listening, etc.) can also be collected by the agent.

One way an agent can obtain a mapping between a given inode and aprocess identifier is to scan within the /proc/pid directory. For eachof the processes currently running, the agent examines each of theirfile descriptors. If a file descriptor is a match for the inode, theagent can determine that the process associated with the file descriptorowns the inode. Once a mapping is determined between an inode and aprocess identifier, the mapping is cached. As additional packets arereceived for the connection, the cached process information is used(rather than a new search being performed).

In some cases, exhaustively scanning for an inode match across everyfile descriptor may not be feasible (e.g., due to CPU limitations). Invarious embodiments, searching through file descriptors is accordinglyoptimized. User filtering is one example of such an optimization. Agiven socket is owned by a user. Any processes associated with thesocket will be owned by the same user as the socket. When matching aninode (identified as relating to a given socket) against processes, theagent can filter through the processes and only examine the filedescriptors of processes sharing the same user owner as the socket. Invarious embodiments, processes owned by root are always searched against(e.g., even when user filtering is employed).

Another example of an optimization is to prioritize searching the filedescriptors of certain processes over others. One such prioritization isto search through the subdirectories of /proc/ starting with theyoungest process. One approximation of such a sort order is to searchthrough /proc/ in reverse order (e.g., examining highest numberedprocesses first). Higher numbered processes are more likely to be newer(i.e., not long-standing processes), and thus more likely to beassociated with new connections (i.e., ones for which inode-processmappings are not already cached). In some cases, the most recentlycreated process may not have the highest process identifier (e.g., dueto the kernel wrapping through process identifiers).

Another example prioritization is to query the kernel for anidentification of the most recently created process and to search in abackward order through the directories in /proc/ (e.g., starting atprocess 400 and working backwards, then wrapping to the highest value(e.g., 32768) and continuing to work backward from there). An alternateapproach is for the agent to keep track of the newest process that ithas reported information on (e.g., to data aggregator 114), and beginits search of /proc/ in a forward order starting from the PID of thatprocess.

Another example prioritization is to maintain, for each user activelyusing node 116, a list of the five most recently active processes. Thoseprocesses are more likely than other processes (less active, or passive)on node 116 to be involved with new connections, and can thus besearched first. For many processes, lower valued file descriptors tendto correspond to non-sockets (e.g., stdin, stdout, stderr). Yet anotheroptimization is to preferentially search higher valued file descriptors(e.g., across processes) over lower valued file descriptors (that areless likely to yield matches).

In some cases, while attempting to locate a process identifier for agiven inode, an agent may encounter a socket that does not correspond tothe inode being matched against and is not already cached. The identityof that socket (and its corresponding inode) can be cached, oncediscovered, thus removing a future need to search for that pair.

In some cases, a connection may terminate before the agent is able todetermine its associated process (e.g., due to a very short-livedconnection, due to a backlog in agent processing, etc.). One approach toaddressing such a situation is to asynchronously collect informationabout the connection using the audit kernel API, which streamsinformation to user space. The information collected from the audit API(which can include PID/inode information) can be matched by the agentagainst pcap/inode information. In some embodiments, the audit API isalways used, for all connections. However, due to CPU utilizationconsiderations, use of the audit API can also be reserved forshort/otherwise problematic connections (and/or omitted, as applicable).

Once the agent has determined which process is associated with thenetwork connection (206), the agent can then collect additionalinformation associated with the process (208). As will be described inmore detail below, some of the collected information comprisesattributes of the process (e.g., a process parent hierarchy, and anidentification of a binary associated with the process). As will also bedescribed in more detail below, other of the collected information isderived (e.g., session summarization data and hash values).

The collected information is then transmitted (210), e.g., by an agent(e.g., agent 112) to a data aggregator (e.g., data aggregator 114),which in turn provides it to platform 102. In some embodiments, allinformation collected by an agent is transmitted (e.g., to a dataaggregator and/or to platform 102). In other embodiments, the amount ofdata transmitted is minimized (e.g., for efficiency reasons), usingvarious techniques.

One approach to minimizing the amount of data flowing from agents (suchas agents installed on nodes 108) to platform 102 is to use a techniqueof implicit references with unique keys. The keys can be explicitly usedby platform 102 to extract/derive relationships, as necessary, in a dataset at a later time, without impacting performance.

Depicted in FIG. 3A is initial information collected by an agent about aprocess. Region 302 indicates the time at which the agent generatedevent 300. Region 304 indicates that event 300 pertains to a process.The type identifies a physical collection of related attributes. Otherexamples of event types that the agent can collect and report (andexamples of the types of information included in such reports) areprovided below (e.g., in Additional Agent Data Examples).

Region 306 indicates the process ID (PID) of the process, and region 310indicates the time the process was started. In region 308 is depicted ahash, generated by the agent to uniquely identify the particular processbeing reported on in event 300 (e.g., among all other processes whosedata is reported to platform 102). In various embodiments, such hashes(and other hashes, such as are shown at 312-316) are generatedpseudo-randomly. The hashes can be reconstructed should the agent crashand restart. An example salt for the hashes is a combination of a localprocess identifier, start time of the process, and one or more machineattributes.

Region 318 indicates whether the process is associated with a terminal,an indicator of whether a process is interactive. Region 320 indicates aSHA-256 hash of the entire command line used to start the process,including any variable arguments, and region 322 indicates the path tothe executable. Region 324 indicates the effective username of the ownerof the process (which can either be the same or different from theusername shown in region 328). As an example, suppose a user logs intonode 116 using a first username, and then becomes a different user(e.g., using the setuid system call to inherit the permissions of asecond user). Both names can be preserved in regions 324 and 328,respectively. Finally, region 326 indicates whether the process isrunning as a container isolation.

As previously mentioned, some data collected about a process is constantand does not change over the lifetime of the process (e.g., attributes),and some data changes (e.g., statistical information and other variableinformation). The data depicted in FIG. 3A is an example of constantdata. It can be transmitted (210) once, when the agent first becomesaware of the process. And, if any changes to the data depicted in FIG.3A are detected (e.g., a process changes its parent), a refreshedversion of the data depicted in FIG. 3A can be transmitted (210) asapplicable.

FIG. 3B illustrates an example of variable data that can be collectedusing the process shown in FIG. 2. Variable data such as is shown inFIG. 3B can be transmitted (210) at periodic (or other) intervals.Region 352 indicates a timestamp of when dataset 350 was collected bythe agent. The hash depicted in region 354 is the same hash that wasincluded in region 308, and is used within platform 102 to join processcreation time attributes (e.g., shown in FIG. 3A) with runtimeattributes (e.g., shown in FIG. 3B) to construct a full dataset. Region356 indicates a thread count for the process. Region 358 indicates thetotal virtual memory used by the process. Region 360 indicates the totalresident memory used by the process. Region 362 indicates the total timespent by the process executing in user space. Region 364 indicates thetotal time spent by the process executing in kernel space.

C. Additional Agent Data Examples

Below are additional examples of data that an agent, such as agent 112,can collect and provide to platform 102.

1. User Data

Core User Data: user name, UID (user ID), primary group, other groups,home directory.

Failed Login Data: IP address, hostname, username, count.

User Login Data: user name, hostname, IP address, start time, TTY(terminal), UID (user ID), GID (group ID), process, end time.

2. Machine Data

Dropped Packet Data: source IP address, destination IP address,destination port, protocol, count.

Machine Data: hostname, domain name, architecture, kernel, kernelrelease, kernel version, OS, OS version, OS description, CPU, memory,model number, number of cores, last boot time, last boot reason, tags(e.g., Cloud provider tags such as AWS, GCP, or Azure tags), defaultrouter, interface name, interface hardware address, interface IP addressand mask, promiscuous mode.

3. Network Data

Network Connection Data: source IP address, destination IP address,source port, destination port, protocol, start time, end time, incomingand outgoing bytes, source process, destination process, direction ofconnection, histograms of packet length, inter packet delay, sessionlengths, etc.

Listening Ports in Server: source IP address, port number, protocol,process.

Dropped Packet Data: source IP address, destination IP address,destination port, protocol, count.

Arp Data: source hardware address, source IP address, destinationhardware address, destination IP address.

DNS Data: source IP address, response code, response string, question(request), packet length, final answer (response).

4. Application Data

Package Data: exe path, package name, architecture, version, packagepath, checksums (MD5, SHA-1, SHA-256), size, owner, owner ID.

Application Data: command line, PID (process ID), start time, UID (userID), EUID (effective UID), PPID (parent process ID), PGID (process groupID), SID (session ID), exe path, username, container ID.

5. Container Data

Container Image Data: image creation time, parent ID, author, containertype, repo, (AWS) tags, size, virtual size, image version.

Container Data: container start time, container type, container name,container ID, network mode, privileged, PID mode, IP addresses,listening ports, volume map, process ID.

6. File Data

File path, file data hash, symbolic links, file creation data, filechange data, file metadata, file mode.

D. Additional Information about Containers

As mentioned above, an agent, such as agent 112, can be deployed in acontainer (e.g., a Docker container), and can also be used to collectinformation about containers. Collection about a container can beperformed by an agent irrespective of whether the agent is itselfdeployed in a container or not (as the agent can be deployed in acontainer running in a privileged mode that allows for monitoring).

Agents can discover containers (e.g., for monitoring) by listening forcontainer create events (e.g., provided by Docker), and can also performperiodic ordered discovery scans to determine whether containers arerunning on a node. When a container is discovered, the agent can obtainattributes of the container, e.g., using standard Docker API calls(e.g., to obtain IP addresses associated with the container, whetherthere's a server running inside, what port it is listening on,associated PIDs, etc.). Information such as the parent process thatstarted the container can also be collected, as can information aboutthe image (which comes from the Docker repository).

In various embodiments, agents use namespaces to determine whether aprocess is associated with a container or not. Namespaces are a featureof the Linux kernel that can be used to isolate resources of acollection of processes. Examples of namespaces include process ID (PID)namespaces, network namespaces, and user namespaces. Given a process,the agent can perform a fast lookup to determine whether the process ispart of the namespace the container claims to be its namespace.

E. Data Reporting

As mentioned above, agents can be configured to report certain types ofinformation (e.g., attribute information) once, when the agent firstbecomes aware of a process. In various embodiments, such staticinformation is not reported again (or is reported once a day, everytwelve hours, etc.), unless it changes (e.g., a process changes itsparent, changes its owner, or a SHA-1 of the binary associated with theprocess changes).

In contrast to static/attribute information, certain types of datachange constantly (e.g., network-related data). In various embodiments,agents are configured to report a list of current connections everyminute (or other appropriate time interval). In that connection listwill be connections that started in that minute interval, connectionsthat ended in that minute interval, and connections that were ongoingthroughout the minute interval (e.g., a one minute slice of a one hourconnection).

In various embodiments, agents are configured to collect/computestatistical information about connections (e.g., at the one minute levelof granularity). Examples of such information include, for the timeinterval, the number of bytes transferred, and in which direction.Another example of information collected by an agent about a connectionis the length of time between packets. For connections that spanmultiple time intervals (e.g., a seven minute connection), statisticsare calculated for each minute of the connection. Such statisticalinformation (for all connections) can be reported (e.g., to a dataaggregator) once a minute.

In various embodiments, agents are also configured to maintain histogramdata for a given network connection, and provide it (in the Apache Avrodata exchange format) under the Connection event type data. Examples ofsuch histograms include: 1. a packet length histogram (packet_len_hist),which characterizes network packet distribution; 2. a session lengthhistogram (session_len_hist), which characterizes a network sessionlength; 3. a session time histogram (session_time_hist), whichcharacterizes a network session time; and 4. a session switch timehistogram (session_switch_time_hist), which characterizes networksession switch time (i.e., incoming→outgoing and vice versa). FIGS. 3Cand 3D depict, side-by-side, examples of full outgoing (3C) and incoming(3D) network data sets, including each of the four histograms. Each ofthe histograms shown in FIGS. 3C and 3D includes the followingfields: 1. count, which provides a count of the elements in thesampling; 2. sum, which provides a sum of elements in the sampling; 3.max, which provides the highest value element in the sampling; 4.std_dev, which provides the standard deviation of elements in thesampling; and 5. buckets, which provides a discrete sample bucketdistribution of sampling data (if applicable).

For some protocols (e.g., HTTP), typically, a connection is opened, astring is sent, a string is received, and the connection is closed. Forother protocols (e.g., NFS), both sides of the connection engage in aconstant chatter. Histograms allow platform 102 to model applicationbehavior (e.g., using machine learning techniques), for establishingbaselines, and for detecting deviations. As one example, suppose that agiven HTTP server typically sends/receives 1,000 bytes (in eachdirection) whenever a connection is made with it. If a connectiongenerates 500 bytes of traffic, or 2,000 bytes of traffic, suchconnections would be considered within the typical usage pattern of theserver. Suppose, however, that a connection is made that results in 10 Gof traffic. Such a connection is anomalous and can be flaggedaccordingly.

F. Storing Data Collected by Agents

Returning to FIG. 1, as previously mentioned, data aggregator 114 isconfigured to provide information (e.g., collected from nodes 108 byagents) to platform 102. And, data aggregator 128 is similarlyconfigured to provide information to platform 102. As shown in FIG. 1,both aggregator 114 and aggregator 128 connect to a load balancer 130,which accepts connections from aggregators (and/or as applicable,agents), as well as other devices, such as computer 126 (e.g., when itcommunicates with web app 120), and supports fair balancing. In variousembodiments, load balancer 130 is a reverse proxy that load balancesaccepted connections internally to various microservices (described inmore detail below), allowing for services provided by platform 102 toscale up as more agents are added to the environment and/or as moreentities subscribe to services provided by platform 102. Example ways toimplement load balancer 130 include using HaProxy, using nginx, andusing elastic load balancing (ELB) services made available by Amazon.

Agent service 132 is a microservice that is responsible for acceptingdata collected from agents (e.g., provided by aggregator 114). Invarious embodiments, agent service 132 uses a standard secure protocol,such as HTTPS to communicate with aggregators (and as applicableagents), and receives data in an appropriate format such as Apache Avro.When agent service 132 receives an incoming connection, it can perform avariety of checks, such as to see whether the data is being provided bya current customer, and whether the data is being provided in anappropriate format. If the data is not appropriately formatted (and/oris not provided by a current customer), it is rejected. If the data isappropriately formatted, agent service 132 facilitates copying thereceived data to a streaming data stable storage (e.g., using AmazonKinesis (134)). Once the ingesting into Kinesis is complete, service 132sends an acknowledgement to the data provider (e.g., data aggregator114). If the agent does not receive such an acknowledgement, it isconfigured to retry sending the data to platform 102. One way toimplement agent service 132 is as a REST API server framework (e.g.,Java DropWizard), configured to communicate with Kinesis (e.g., using aKinesis library).

In various embodiments, platform 102 uses one or more Kinesis streams(134) for all incoming customer data (e.g., including data provided bydata aggregator 114 and data aggregator 128), and the data is sharedbased on the node (also referred to herein as a “machine”) thatoriginated the data (e.g., node 116 vs. node 122), with each node havinga globally unique identifier within platform 102. Multiple instances ofagent service 132 can write to multiple shards.

Kinesis is a streaming service with a limited period (e.g., 1-7 days).To persist data longer than a day, it is copied to long term storage(e.g., S3). S3 Loader 136 is a microservice that is responsible forpicking up data from Kinesis stream 134 and persisting it in S3 (138).In one example embodiment, files collected by S3 Loader 136 from theKinesis stream are placed into one or more buckets, and segmented usinga combination of a customer identifier and time slice. Given aparticular time segment, and a given customer identifier, thecorresponding file (stored in S3) contains five minutes (or anotherappropriate time slice) of data collected at that specific customer fromall of the customer's nodes. S3 Loader 136 can be implemented in anyappropriate programming language, such as Java or C, and can beconfigured to use a Kinesis library to interface with Kinesis. Invarious embodiments, S3 Loader 136 uses the Amazon Simple Queue Service(SQS) (e.g., to alert DB Loader 140 that there is work for it to do).

DB Loader 140 is a microservice that is responsible for loading datainto an appropriate database service (142), such as SnowflakeDB orAmazon Redshift, using individual per-customer databases. In particular,DB Loader 140 is configured to periodically load data into a set of rawtables from files created by S3 Loader 136 as per above. DB Loader 140manages throughput, errors, etc., to make sure that data is loadedconsistently and continuously. Further, DB Loader 140 can read incomingdata and load into database 142 data that is not already present indatabase 142's tables. DB Loader 140 can be implemented in anyappropriate programming language, such as Java or C, and an SQLframework such as jOOQ (e.g., to manage SQLs for insertion of data), andSQL/JDBC libraries. DB Loader 140 also uses Amazon S3 and Amazon SimpleQueue Service (SQS) to manage files being transferred to and from thedatabase (e.g., Snowflake).

Customer data included in database 142 can be augmented with data fromadditional data sources, such as AWS Cloud Trail Analyzer 144, which isanother microservice. AWS Cloud Trail Analyzer 144 pulls data usingAmazon Cloudtrail for each applicable customer account, as soon as thedata is available. AWS Cloud Trail Analyzer 144 normalizes theCloudtrail data as applicable, so that it can be inserted into database142 for later querying/analysis. AWS Cloud Trail Analyzer 144 can bewritten in any appropriate programming language, such as Java or C. AWSCloud Trail Analyzer 144 also makes use of SQL/JDBC libraries tointeract with database 142 to insert/query data.

II. Polygraphs

A. Polygraph Overview

As previously mentioned, platform 102 can model activities that occurwithin datacenters, such as datacenters 104 and 106. The model is stableover time, and differences, even subtle ones (e.g., between a currentstate of the datacenter and the model) can be surfaced. The ability tosurface such anomalies can be particularly important in datacenterenvironments where rogue employees and/or external attackers may operateslowly (e.g., over a period of months), hoping that the elastic natureof typical resource use (e.g., virtualized servers) will help concealtheir nefarious activities.

Using techniques described herein, platform 102 can automaticallydiscover entities deployed in a given datacenter. Examples of entitiesinclude workloads, applications, processes, machines, virtual machines,containers, files, IP addresses, domain names, and users. The entitiesare grouped together logically (into analysis groups) based onbehaviors, and temporal behavior baselines can be established. Inparticular, using techniques described herein, periodic graphs can beconstructed (also referred to herein as polygraphs), in which the nodesare applicable logical entities, and the edges represent behavioralrelationships between the logical entities in the graph. Baselines canbe created for every node and edge.

Communication (e.g., between applications/nodes) is one example of abehavior. A model of communications between processes is an example of abehavioral model. As another example, the launching of applications isanother example of a behavior that can be modeled. The baselines areupdated hourly for every entity. Deviations from the expected normalbehavior can then be detected and automatically reported (e.g., asanomalies or threats detected). Such deviations may be due to a desiredchange, a misconfiguration, or malicious activity. As applicable,platform 102 can score the detected deviations (e.g., based on severityand threat posed). Additional examples of analysis groups include modelsof machine communications, models of privilege changes, and models ofinsider behaviors (monitoring the interactive behavior of human users asthey operate within the datacenter).

Two types of information collected by agents (described in more detailabove) are network level information and process level information. Aspreviously mentioned, agents collect information about every connectioninvolving their respective nodes. And, for each connection, informationabout both the server and the client is collected (e.g., using theconnection-to-process identification techniques described above). DNSqueries and responses are also collected. The DNS query information canbe used in logical entity graphing (e.g., collapsing many different IPaddresses to a single service—s3.amazon.com). Examples of process levelinformation collected by agents include attributes (user ID, effectiveuser ID, and command line). Information such as what user/application isresponsible for launching a given process and the binary being executed(and its SHA-256 values) is also provided by agents.

The dataset collected by agents across a datacenter can be very large,and many resources (e.g., virtual machines, IP addresses, etc.) arerecycled very quickly. For example, an IP address and port number usedat a first point in time by a first process on a first virtual machinemay very rapidly be used (e.g., an hour later) by a differentprocess/virtual machine.

A dataset (and elements within it) can be considered at both a physicallevel, and a logical level, as illustrated in FIG. 4. In particular,FIG. 4 illustrates an example 5-tuple of data (402) collected by anagent, represented physically (414) and logically (416). The 5-tupleincludes a source address (404), a source port (406), a destinationaddress (408), a destination port (410), and a protocol (412). In somecases, port numbers (e.g., 406, 410) may be indicative of the nature ofa connection (e.g., with certain port usage standardized). However, inmany cases, and in particular in datacenters, port usage is ephemeral.For example, a Docker container can listen on an ephemeral port, whichis unrelated to the service it will run. When another Docker containerstarts (for the same service), the port may well be different.Similarly, particularly in a virtualized environment, IP addresses maybe recycled frequently (and are thus also potentially ephemeral) orcould be NATed, which makes identification difficult.

A physical representation of the 5-tuple is depicted in region 414. Aprocess 418 (executing on machine 420) has opened a connection tomachine 422. In particular, process 418 is in communication with process424. Information such as the number of packets exchanged between the twomachines over the respective ports can be recorded.

As previously mentioned, in a datacenter environment, portions of the5-tuple may change—potentially frequently—but still be associated withthe same behavior. Namely, one application (e.g., Apache) may frequentlybe in communication with another application (e.g., Oracle), usingephemeral datacenter resources. Further, either/both of Apache andOracle may be multi-homed. This can lead to potentially thousands of5-tuples (or more) that all correspond to Apache communicating withOracle within a datacenter. For example, Apache could be executed on asingle machine, and could also be executed across fifty machines, whichare variously spun up and down (with different IP addresses each time).An alternate representation of the 5-tuple shown in region 402 isdepicted in region 416, and is logical. The logical representation ofthe 5-tuple aggregates the 5-tuple (along with other connections betweenApache and Oracle having other 5-tuples) as logically representing thesame connection. By aggregating data from raw physical connectioninformation into logical connection information, using techniquesdescribed herein, a size reduction of six orders of magnitude in thedata set can be achieved.

FIG. 5 depicts a portion of a logical polygraph. Suppose a datacenterhas seven instances of the application update_engine (502), executing asseven different processes on seven different machines, having sevendifferent IP addresses, and using seven different ports. The instancesof update_engine variously communicate with update.core-os.net (504),which may have a single IP address or many IP addresses itself, over theone hour time period represented in the polygraph. In the example shownin FIG. 5, update_engine is a client, connecting to the serverupdate.core-os.net, as indicated by arrow 508.

Behaviors of the seven processes are clustered together, into a singlesummary. As indicated in region 506, statistical information about theconnections is also maintained (e.g., number of connections, histograminformation, etc.). A polygraph such as is depicted in FIG. 5 can beused to establish a baseline of behavior (e.g., at the one-hour level),allowing for the future detection of deviations from that baseline. Asone example, suppose that statistically an update_engine instancetransmits data at 11 bytes per second. If an instance were instead totransmit data at 1000 bytes per second, such behavior would represent adeviation from the baseline and could be flagged accordingly. Similarly,changes that are within the baseline (e.g., an eighth instance ofupdate_engine appears, but otherwise behaves as the other instances; orone of the seven instances disappears) are not flagged as anomalous.Further, datacenter events, such as failover, autobalancing, and A-Brefresh are unlikely to trigger false alarms in a polygraph, as at thelogical level, the behaviors remain the same.

In various embodiments, polygraph data is maintained for everyapplication in a datacenter, and such polygraph data can be combined tomake a single datacenter view across all such applications. FIG. 6illustrates a portion of a polygraph for a service that evidences morecomplex behaviors than are depicted in FIG. 5. In particular, FIG. 6illustrates the behaviors of S3 as a service (as used by a particularcustomer datacenter). Clients within the datacenter variously connect tothe S3 service using one of five fully qualified domains (listed inregion 602). Contact with any of the domains is aggregated as contactwith S3 (as indicated in region 604). Depicted in region 606 are variouscontainers which (as clients) connect with S3. Other containers (whichdo not connect with S3) are not included. As with the polygraph portiondepicted in FIG. 5, statistical information about the connections isknown and summarized, such as the number of bytes transferred, histograminformation, etc.

FIG. 7 illustrates a communication polygraph for a datacenter. Inparticular, the polygraph indicates a one hour summary of approximately500 virtual machines, which collectively run one million processes, andmake 100 million connections in that hour. As illustrated in FIG. 7, apolygraph represents a drastic reduction in size (e.g., from trackinginformation on 100 million connections in an hour, to a few hundrednodes and a few hundred edges). Further, as a datacenter scales up(e.g., from using 10 virtual machines to 100 virtual machines as thedatacenter uses more workers to support existing applications), thepolygraph for the datacenter will tend to stay the same size (with the100 virtual machines clustering into the same nodes that the 10 virtualmachines previously clustered into). As new applications are added intothe datacenter, the polygraph will automatically scale to includebehaviors involving those applications.

In the particular polygraph shown in FIG. 7, nodes generally correspondto workers, and edges correspond to communications the workers engage in(with connection activity being the behavior modeled in polygraph 700).Another example polygraph could model other behavior, such asapplication launching. The communications graphed in FIG. 7 includetraffic entering the datacenter, traffic exiting the datacenter, andtraffic that stays wholly within the datacenter (e.g., traffic betweenworkers). One example of a node included in polygraph 700 is the sshdapplication, depicted as node 702. As indicated in FIG. 7, 421 instancesof sshd were executing during the one hour time period of datarepresented in polygraph 700. As indicated in region 704, nodes withinthe datacenter communicated with a total of 1349 IP addresses outside ofthe datacenter (and not otherwise accounted for, e.g., as belonging to aservice such as Amazon AWS (706) or Slack (708)).

B. Interacting with Polygraphs

In the following examples, suppose that Bob, an administrator ofdatacenter 106, is interacting with platform 102 to view visualizationsof polygraphs in a web browser (e.g., as served to him via web app 120).One type of polygraph Bob can view is an application-communicationpolygraph, which indicates, for a given one hour window, whichapplications communicated with which other applications. Another type ofpolygraph Bob can view is an application launch polygraph. Bob can alsoview graphs related to user behavior, such as an insider behavior graphwhich tracks user connections (e.g., to internal and externalapplications, including chains of such behavior), a privilege changegraph which tracks how privileges change between processes, and a userlogin graph, which tracks which (logical) machines a user logs into.

FIG. 8 illustrates an example of an application-communication polygraphfor a datacenter (e.g., datacenter 106) for the one hour period of 9am-10 am on June 5. The time slice currently being viewed is indicatedin region 802. If Bob clicks his mouse in region 804, Bob will be showna representation of the application-communication polygraph as generatedfor the following hour (10 am-11 am on June 5).

FIG. 9 depicts what is shown in Bob's browser after he has clicked onregion 804, and has further clicked on region 806. The selection inregion 806 turns on and off the ability to compare two time intervals toone another. Bob can select from a variety of options when comparing the9 am-10 am and 10 am-11 am time intervals. By clicking region 904, Bobwill be shown the union of both graphs (i.e., any connections that werepresent in either time interval). By clicking region 906, Bob will beshown the intersection of both graphs (i.e., only those connections thatwere present in both time intervals).

As shown in FIG. 9, Bob has elected to click on region 908, whichdepicts connections that are only present in the 9 am-10 am polygraph inpurple (910), and depicts connections that are only present in the 10am-11 am polygraph in blue (912). Connections present in both polygraphsare omitted from display. As one example, in the 9 am-10 am polygraph(corresponding to connections made during the 9 am-10 am time period atdatacenter 106), a connection was made by a server to sshd (914) andalso to systemd (916). Both of those connections ended prior to 10 amand are thus depicted in purple. As another example, in the 10 am-11 ampolygraph (corresponding to connections made during the 10 am-11 am timeperiod at datacenter 106), a connection was made from a known badexternal IP to nginx (918). The connection was not present during the 9am-10 am time slice and thus is depicted in blue. As yet anotherexample, two different connections were made to a Slack service between9 am and 11 am. However, the first was made by a first client during the9 am-10 am time slice (920) and the second was made by a differentclient during the 10 am-11 am slice (922), and so the two connectionsare depicted respectively in purple and blue.

Returning to the polygraph depicted in FIG. 8, suppose Bob enters “etcd”into the search box located in region 810. Bob will then be presentedwith the interface illustrated in FIG. 10. As shown in FIG. 10, threeapplications containing the term “etcd” were engaged in communicationsduring the 9 am-10 am window. One application is etcdctl, a command lineclient for etcd. As shown in FIG. 10, a total of three different etcdctlprocesses were executed during the 9 am-10 am window, and were clusteredtogether (1002). FIG. 10 also depicts two different clusters that areboth named etcd2. The first cluster includes (for the 9 am-10 am window)five members (1004) and the second cluster includes (for the samewindow) eight members (1006). The reason for these two distinct clustersis that the two groups of applications behave differently (e.g., theyexhibit two distinct sets of communication patterns). Specifically, theinstances of etcd2 in cluster 1004 only communicate with locksmithctl(1008) and other etcd2 instances (in both clusters 1004 and 1006). Theinstances of etcd2 in cluster 1006 communicate with additional entities,such as etcdctl and Docker containers. As desired, Bob can click on oneof the clusters (e.g., cluster 1004) and be presented with summaryinformation about the applications included in the cluster, as is shownin FIG. 11 (e.g., in region 1102). He can also double click on a givencluster (e.g., cluster 1004) to see details on each of the individualmembers of the cluster broken out.

Suppose Bob now clicks on region 812 of the interface shown in FIG. 8.Bob will then be shown an application launch polygraph. Launching anapplication is another example of a behavior. The launch polygraphmodels how applications are launched by other applications. FIG. 12illustrates an example of a portion of a launch polygraph. Inparticular, Bob has typed “find” into region 1202, to see how the “find”application is being launched. As shown in FIG. 12, in the launchpolygraph for the 10 am-11 am time period, find applications (1204) arealways launched by bash (1206), which is in turn always launched bysystemd (1208). If find is launched by a different application, thiswould be anomalous behavior.

FIG. 13 illustrates another example of a portion of an applicationlaunch polygraph. In FIG. 13, Bob has searched (1302) for “python ma” tosee how “python marathon_lb” (1304) is launched. As shown in FIG. 13, ineach case (during the one hour time slice of 10 am-11 am), pythonmarathon_lb is launched as a result of a chain of the same sevenapplications each time. If python marathon_lb is ever launched in adifferent manner, this indicates anomalous behavior. The behavior couldbe indicative of malicious activities, but could also be due to otherreasons, such as a misconfiguration, a performance-related issue, and/ora failure, etc.

Suppose Bob now clicks on region 814 of the interface shown in FIG. 8.Bob will then be shown an insider behavior graph. The insider behaviorgraph tracks information about behaviors such as processes started by auser interactively using protocols such as ssh or telnet, and anyprocesses started by those processes. As one example, suppose anadministrator logs into a first virtual machine in datacenter 106 (e.g.,using sshd via an external connection he makes from a hotel), using afirst set of credentials (e.g., charlie.smith@example.com and anappropriate password). From the first virtual machine, the administratorconnects to a second virtual machine (e.g., using the same credentials),then uses the sudo command to change identities to those of anotheruser, and then launches a program. Graphs built by platform 102 can beused to associate the administrator with each of his actions, includinglaunching the program using the identity of another user.

FIG. 14 illustrates an example of a portion of an insider behaviorgraph. In particular, in FIG. 14, Bob is viewing a graph thatcorresponds to the time slice of 3 pm-4 pm on June 1. FIG. 14illustrates the internal/external applications that users connected toduring the one hour time slice. If a user typically communicates withparticular applications, that information will become part of abaseline. If the user deviates from his baseline behavior (e.g., usingnew applications, or changing privilege in anomalous ways), suchanomalies can be surfaced.

FIG. 15 illustrates an example of a portion of a privilege change graph,which identifies how privileges are changed between processes.Typically, when a user launches a process (e.g., “ls”), the processinherits the same privileges that the user has. And, while a process canhave fewer privileges than the user (i.e., go down in privilege), it israre (and generally undesirable) for a user to escalate in privilege.Information included in the privilege change graph can be determined byexamining the parent of each running process, and determining whetherthere is a match in privilege between the parent and the child. If theprivileges are different, a privilege change has occurred (whether achange up or a change down). The application ntpd is one rare example ofa scenario in which a process escalates (1502) to root, and then returnsback (1504). The sudo command is another example (e.g., used by anadministrator to temporarily have a higher privilege). As with the otherexamples, ntpd's privilege change actions, and the legitimate actions ofvarious administrators (e.g., using sudo) will be incorporated into abaseline model by platform 102. When deviations occur, such as where anew application that is not ntpd escalates privilege, or where anindividual that has not previously/does not routinely use sudo does so,such behaviors can be identified as anomalous.

FIG. 16 illustrates an example of a portion of a user login graph, whichidentifies which users log into which logical nodes. Physical nodes(whether bare metal or virtualized) are clustered into a logical machinecluster, for example, using yet another graph, a machine-server graph,an example of which is shown in FIG. 17. For each machine, adetermination is made as to what type of machine it is, based on whatkind(s) of workflows it runs. As one example, some machines run asmaster nodes (having a typical set of workflows they run, as masternodes) and can thus be clustered as master nodes. Worker nodes aredifferent from master nodes, for example, because they run Dockercontainers, and frequently change as containers move around. Workernodes can similarly be clustered.

Additional information regarding use of graphs such as are depicted inFIGS. 14-17 is provided in Section IV below.

C. Polygraph Construction

As previously mentioned, the polygraph depicted in FIG. 7 corresponds toactivities in a datacenter in which, in a given hour, approximately 500virtual machines collectively run one million processes, and make 100million connections in that hour. The polygraph represents a drasticreduction in size (e.g., from tracking information on 100 millionconnections in an hour, to a few hundred nodes and a few hundred edges).Using techniques described herein, such a polygraph can be constructed(e.g., using commercially available computing infrastructure) in lessthan an hour (e.g., within a few minutes). Thus, ongoing hourlysnapshots of a datacenter can be created within a two hour moving window(i.e., collecting data for the time period Sam-9 am, while alsogenerating a snapshot for the time previous time period 7 am-8 am). Thefollowing section describes various example infrastructure that can beused in polygraph construction, and also describes various techniquesthat can be used to construct polygraphs.

1. Example Infrastructure

Returning to FIG. 1, embodiments of platform 102 are built using AWSinfrastructure as a service (IaaS). For example, platform 102 can useSimple Storage Service (S3) for data storage, Key Management Service(KMS) for managing secrets, Simple Queue Service (SQS) for managingmessaging between applications, Simple Email Service (SES) for sendingemails, and Route 53 for managing DNS. Other infrastructure tools canalso be used. Examples include: orchestration tools (e.g., Kubernetes orMesos/Marathon), service discovery tools (e.g., Mesos-DNS), service loadbalancing tools (e.g., marathon-LB), container tools (e.g., Docker orrkt), log/metric tools (e.g., collectd, fluentd, kibana, etc.), big dataprocessing systems (e.g., Spark, Hadoop, AWS Redshift, Snowflake etc.),and distributed key value stores (e.g., Apache Zookeeper or etcd2).

As previously mentioned, in various embodiments, platform 102 makes useof a collection of microservices. Each microservice can have multipleinstances, and is configured to recover from failure, scale, anddistribute work amongst various such instances, as applicable. Forexample, microservices are auto-balancing for new instances, and candistribute workload if new instances are started or existing instancesare terminated. In various embodiments, microservices are deployed asself-contained Docker containers. A Mesos-Marathon or Spark frameworkcan be used to deploy the microservices (e.g., with Marathon monitoringand restarting failed instances of microservices as needed). The serviceetcd2 can be used by microservice instances to discover how many peerinstances are running, and used for calculating a hash-based scheme forworkload distribution. Microservices are configured to publish varioushealth/status metrics to either an SQS queue, or etcd2, as applicable.And, Amazon DynamoDB can be used for state management.

Additional information on various microservices used in embodiments ofplatform 102 is provided below.

a. GraphGen

GraphGen (146) is a microservice that is responsible for generating rawbehavior graphs on a per customer basis periodically (e.g., once anhour). In particular, GraphGen 146 generates graphs of entities (as thenodes in the graph) and activities between entities (as the edges). Invarious embodiments, GraphGen 146 also performs other functions, such asaggregation, enrichment (e.g., geolocation and threat), reverse DNSresolution, TF-IDF based command line analysis for command typeextraction, parent process tracking, etc.

GraphGen 146 performs joins on data collected by the agents, so thatboth sides of a behavior are linked. For example, suppose a firstprocess on a first virtual machine (e.g., having a first IP address)communicates with a second process on a second virtual machine (e.g.,having a second IP address). Respective agents on the first and secondvirtual machines will each report information on their view of thecommunication (e.g., the PID of their respective processes, the amountof data exchanged and in which direction, etc.). When GraphGen performsa join on the data provided by both agents, the graph will include anode for each of the processes, and an edge indicating communicationbetween them (as well as other information, such as the directionalityof the communication—i.e., which process acted as the server and whichas the client in the communication).

In some cases, connections are process to process (e.g., from a processon one virtual machine within ACME to another process on a virtualmachine within ACME). In other cases, a process may be in communicationwith a node (e.g., outside of ACME) which does not have an agentdeployed upon it. As one example, a node within ACME might be incommunication with node 172, outside of ACME. In such a scenario,communications with node 172 are modeled (e.g., by GraphGen 146) usingthe IP address of node 172. Similarly, where a node within ACME does nothave an agent deployed upon it, the IP address of the node can be usedby GraphGen in modeling.

Graphs created by GraphGen 146 are written to database 142 and cachedfor further processing. The graph is a summary of all activity thathappened in the time interval. As each graph corresponds to a distinctperiod of time, different rows can be aggregated to find summaryinformation over a larger timestamp. And, picking two different graphsfrom two different timestamps can be used to compare different periods.If necessary, GraphGen can parallelize its workload (e.g., where itsbacklog cannot otherwise be handled within an hour, or if is required toprocess a graph spanning a long time period).

GraphGen can be implemented in any appropriate programming language,such as Java or C, and machine learning libraries, such as Spark'sMLLib. Example ways that GraphGen computations can be implementedinclude using SQL or Map-R, using Spark or Hadoop.

b. sshTracker

SshTracker (148) is a microservice that is responsible for following sshconnections and process parent hierarchies to determine trails of userssh activity. Identified ssh trails are placed by the sshTracker intodatabase 142 and cached for further processing.

SshTracker 148 can be implemented in any appropriate programminglanguage, such as Java or C, and machine libraries, such as Spark'sMLLib. Example ways that sshTracker computations can be implementedinclude using SQL or Map-R, using Spark or Hadoop.

c. ThreatAggr

ThreatAggr (150) is a microservice that is responsible for obtainingthird party threat information from various applicable sources, andmaking it available to other microservices. Examples of such informationinclude reverse DNS information, GeoIP information, lists of known baddomains/IP addresses, lists of known bad files etc. As applicable, thethreat information is normalized before insertion into database 142.ThreatAggr can be implemented in any appropriate programming language,such as Java or C, using SQL/JDBC libraries to interact with database142 (e.g., for insertions and queries).

d. Hawkeye

Hawkeye (152) is a microservice that acts as a scheduler and can runarbitrary jobs organized as a directed graph. Hawkeye ensures that alljobs for all customers are able to run every hour. It handles errors andretrying for failed jobs, tracks dependencies, manages appropriateresource levels, and scales jobs as needed. Hawkeye can be implementedin any appropriate programming language, such as Java or C. A variety ofcomponents can also be used, such as open source scheduler frameworks(e.g., Airflow), or AWS services (e.g., the AWS Data pipeline) which canbe used for managing schedules.

e. GBM

Graph Behavior Modeler (GBM) (154) is a microservice that computesPolygraphs. In particular, the GBM can be used to find clusters of nodesin a graph that should be considered similar based on some set of theirproperties and relationships to other nodes. As will be described inmore detail below, the clusters and their relationships can be used toprovide visibility into a datacenter environment without requiring userspecified labels. The GBM tracks such clusters over time persistently,allowing for changes to be detected and alerts to be generated.

The GBM takes as input a raw graph (e.g., as generated by GraphGen 146),nodes are actors of a behavior, and edges are the behavior relationshipitself. For example, in the case of communication, example actorsinclude processes, which communicate with other processes. The GBMclusters the raw graph based on behaviors of actors and produces asummary (the Polygraph). The Polygraph summarizes behavior at adatacenter level. The GBM also produces “observations” that representchanges detected in the datacenter. Such observations are based ondifferences in cumulative behavior (e.g., the baseline) of thedatacenter with its current behavior. The GBM can be implemented in anyappropriate programming language, such as Java, C, or Golang, usingappropriate libraries (as applicable) to handle distributed graphcomputations (handling large amounts of data analysis in a short amountof time). Apache Spark is another example tool that can be used tocompute Polygraphs. The GBM can also take feedback from users and adjustthe model according to that feedback. For example, if a given user isinterested in relearning behavior for a particular entity, the GBM canbe instructed to “forget” the implicated part of the polygraph.

f. GBM Runner

GBM Runner (156) is a microservice that is responsible for interfacingwith GBM 154 and providing GBM 154 with raw graphs (e.g., using SQL topush any computations it can to database 142). GBM Runner 156 alsoinserts Polygraph output from GBM 154 to database 142. GBM Runner can beimplemented in any appropriate programming language, such as Java or C,using SQL/JDBC libraries to interact with database 142 to insert andquery data.

g. EventGen

EventGen (158) is a microservice that is responsible for generatingalerts. It examines observations (e.g., produced by GBM 154) inaggregate, deduplicates them, and scores them. Alerts are generated forobservations with a score exceeding a threshold. EventGen 158 alsocomputes (or retrieves, as applicable) data that a customer (e.g., Aliceor Bob) might need when reviewing the alert. Examples of events that canbe detected by platform 102 (and alerted on by EventGen 158) include:

new user: This event is created the first time a user (e.g., of node116) is first observed by an agent within a datacenter.

user launched new binary: This event is generated when an interactiveuser launches an application for the first time.

new privilege escalation: This event is generated when user privilegesare escalated and a new application is run.

new application or container: This event is generated when anapplication or container is seen for the first time.

new external connection: This event is generated when a connection to anexternal IP/domain is made from a new application.

new external host or IP: This event is generated when a new externalhost or IP is involved in a connection with a datacenter.

new internal connection: This event is generated when a connectionbetween internal-only applications is seen for the first time.

new external client: This event is generated when a new externalconnection is seen for an application which typically does not haveexternal connections.

new parent: This event is generated when an application is launched by adifferent parent.

connection to known bad IP/domain: Platform 102 maintains (or canotherwise access) one or more reputation feeds. If an environment makesa connection to a known bad IP or domain, an event will be generated.

login from a known bad IP/domain: An event is generated when asuccessful connection to a datacenter from a known bad IP is observed byplatform 102.

EventGen can be implemented in any appropriate programming language,such as Java or C, using SQL/JDBC libraries to interact with database142 to insert and query data. In various embodiments, EventGen also usesone or more machine learning libraries, such as Spark's MLLib (e.g., tocompute scoring of various observations). EventGen can also takefeedback from users about which kinds of events are of interest andwhich to suppress.

h. QsJobServer

QsJob Server (160) is a microservice that looks at all the data producedby platform 102 for an hour, and compiles a materialized view (MV) outof the data to make queries faster. The MV helps make sure that thequeries customers most frequently run, and data that they search for,can be easily queried and answered. QsJob Server 160 also precomputesand caches a variety of different metrics so that they can quickly beprovided as answers at query time. QsJob Server 160 can be implementedusing any appropriate programming language, such as Java or C, usingSQL/JDBC libraries. The QsJob Server is able to compute an MVefficiently at scale, where there could be a large number of joins. AnSQL engine, such as Oracle can be used to efficiently execute the SQL,as applicable.

i. Alert Notifier

Alert notifier 162 is a microservice that takes alerts produced byEventGen 158 and sends the alerts to customers' integrated STEM products(e.g., Splunk, Slack etc.). Alert notifier 162 can be implemented usingany appropriate programming language, such as Java or C. Alert notifier162 can be configured to use an email service (e.g., AWS SES orpagerduty) to send emails. Alert notifier 162 also provides templatingsupport (e.g., Velocity or Moustache) to manage templates and structurednotifications to STEM products.

j. Reporting Module

Reporting module 164 is a microservice responsible for creating reportsout of customer data (e.g., daily summaries of events, etc.) andproviding those reports to customers (e.g., via email). Reporting module164 can be implemented using any appropriate programming language, suchas Java or C. Reporting module 164 can be configured to use an emailservice (e.g., AWS SES or pagerduty) to send emails. Reporting module164 also provides templating support (e.g., Velocity or Moustache) tomanage templates (e.g., for constructing HTML-based email).

k. Web Frontend

Web app 120 is a microservice that provides a user interface to datacollected and processed on platform 102. Web app 120 provides login,authentication, query, data visualization, etc. features. Web app 120includes both client and server elements. Example ways the serverelements can be implemented are using Java DropWizard or Node.Js toserve business logic, and a combination of JSON/HTTP to manage theservice. Example ways the client elements can be implemented are usingframeworks such as React, Angular, or Backbone. JSON, j Query, andJavaScript libraries (e.g., underscore) can also be used.

l. Query Service

Query service 166 is a microservice that manages all database access forweb app 120. Query service 166 abstracts out data obtained from database142 and provides a JSON-based REST API service to web app 120. Queryservice 166 generates SQL queries for the REST APIs that it receives atrun time. Query service 166 can be implemented using any appropriateprogramming language, such as Java or C and SQL/JDBC libraries, or anSQL framework such as jOOQ. Query service 166 can internally make use ofa variety of types of databases, including postgres, AWS Aurora (168) orSnowflake (142) to manage data for clients. Examples of tables thatquery service 166 manages are OLTP tables and data warehousing tables.

m. Redis

Redis (170) is an open source project which provides a key-value store.Platform 102 can use Redis as a cache to keep information for frontendservices about users. Examples of such information include valid tokensfor a customer, valid cookies of customers, the last time a customertried to login, etc.

2. Example Processing

FIG. 18 illustrates an example of a process for detecting anomalies in anetwork environment. In various embodiments, process 1800 is performedby platform 102. The process begins at 1802 when data associated withactivities occurring in a network environment (such as ACME'sdatacenter) is received. One example of such data that can be receivedat 1802 is agent-collected data described above (e.g., in conjunctionwith process 200).

At 1804, a logical graph model is generated, using at least a portion ofthe monitored activities. A variety of approaches can be used togenerate such logical graph models, and a variety of logical graphs canbe generated (whether using the same, or different approaches). Thefollowing is one example of how data received at 1802 can be used togenerate and maintain a model.

During bootstrap, platform 102 creates an aggregate graph of physicalconnections (also referred to herein as an aggregated physical graph) bymatching connections that occurred in the first hour into communicationpairs. Clustering is then performed on the communication pairs. Examplesof such clustering, described in more detail below, include performingMatching Neighbor clustering and similarity (e.g., SimRank) clustering.Additional processing can also be performed (and is described in moredetail below), such as by splitting clusters based on application type,and annotating nodes with DNS query information. The resulting graph(also referred to herein as a base graph or common graph) can be used togenerate a variety of models, where a subset of node and edge types(described in more detail below) and their properties are considered ina given model. One example of a model is a UID to UID model (alsoreferred to herein as a Uid2Uid model) which clusters together processesthat share a username and show similar privilege change behavior.Another example of a model is a CType model, which clusters togetherprocesses that share command line similarity. Yet another example of amodel is a PType model, which clusters together processes that sharebehaviors over time.

Each hour after bootstrap, a new snapshot is taken (i.e., data collectedabout a datacenter in the last hour is processed) and information fromthe new snapshot is merged with existing data to create and (asadditional data is collected/processed) maintain a cumulative graph. Thecumulative graph (also referred to herein as a cumulative PType graphand a polygraph) is a running model of how processes behave over time.Nodes in the cumulative graph are PType nodes, and provide informationsuch as a list of all active processes and PIDs in the last hour, thenumber of historic total processes, the average number of activeprocesses per hour, the application type of the process (e.g., the CTypeof the PType), and historic CType information/frequency. Edges in thecumulative graph can represent connectivity and provide information suchas connectivity frequency. The edges can be weighted (e.g., based onnumber of connections, number of bytes exchanged, etc.). Edges in thecumulative graph (and snapshots) can also represent transitions.

One approach to merging a snapshot of the activity of the last hour intoa cumulative graph is as follows. An aggregate graph of physicalconnections is made for the connections included in the snapshot (as waspreviously done for the original snapshot used during bootstrap). And,clustering/splitting is similarly performed on the snapshot's aggregategraph. Next, PType clusters in the snapshot's graph are compared againstPType clusters in the cumulative graph to identify commonality.

One approach to determining commonality is, for any two nodes that aremembers of a given CmdType (described in more detail below), comparinginternal neighbors and calculating a set membership Jaccard distance.The pairs of nodes are then ordered by decreasing similarity (i.e., withthe most similar sets first). For nodes with a threshold amount ofcommonality (e.g., at least 66% members in common), any new nodes (i.e.,appearing in the snapshot's graph but not the cumulative graph) areassigned the same PType identifier as is assigned to the correspondingnode in the cumulative graph. For each node that is not classified(i.e., has not been assigned a PType identifier), a network signature isgenerated (i.e., indicative of the kinds of network connections the nodemakes, who the node communicates with, etc.). The following processingis then performed until convergence. If a match of the network signatureis found in the cumulative graph, the unclassified node is assigned thePType identifier of the corresponding node in the cumulative graph. Anynodes which remain unclassified after convergence are new PTypes and areassigned new identifiers and added to the cumulative graph as new. Asapplicable, the detection of a new PType can be used to generate analert. If the new PType has a new CmdType, a severity of the alert canbe increased. If any surviving nodes (i.e., present in both thecumulative graph and the snapshot graph) change PTypes, such change isnoted as a transition, and an alert can be generated. Further, if asurviving node changes PType and also changes CmdType, a severity of thealert can be increased.

Changes to the cumulative graph (e.g., a new PType or a new edge betweentwo PTypes) can be used (e.g., at 1806) to detect anomalies (describedin more detail below). Two example kinds of anomalies that can bedetected by platform 102 include security anomalies (e.g., a user orprocess behaving in an unexpected manner) and devops/root causeanomalies (e.g., network congestion, application failure, etc.).Detected anomalies can be recorded and surfaced (e.g., toadministrators, auditors, etc.), such as through alerts which aregenerated at 1808 based on anomaly detection.

Additional detail regarding processing performed, by various componentsdepicted in FIG. 1 (whether performed individually or in combination),in conjunction with model/polygraph construction (e.g., as performed at1804) are provided below.

a. Matching Neighbor Clustering

As explained above, an aggregated physical graph can be generated on aper customer basis periodically (e.g., once an hour) from raw physicalgraph information, by matching connections (e.g., between two processeson two virtual machines). In various embodiments, a deterministic fixedapproach is used to cluster nodes in the aggregated physical graph(e.g., representing processes and their communications). As one example,Matching Neighbors Clustering (MNC) can be performed on the aggregatedphysical graph to determine which entities exhibit identical behaviorand cluster such entities together.

FIG. 19A depicts a set of example processes (p1, p2, p3, and p4)communicating with other processes (p10 and p11). FIG. 19A is agraphical representation of a small portion of an aggregated physicalgraph showing (for a given hour) which processes in a datacentercommunicate with which other processes. Using MNC, processes p1, p2, andp3 will be clustered together (1902), as they exhibit identical behavior(they communicate with p10 and only p10). Process p4, which communicateswith both p10 and p11, will be clustered separately.

b. SimRank

In MNC, only those processes exhibiting identical (communication)behavior will be clustered. In various embodiments, an alternateclustering approach can also/instead be used, which uses a similaritymeasure (e.g., constrained by a threshold value, such as a 60%similarity) to cluster items. In some embodiments, the output of MNC isused as input to SimRank, in other embodiments, MNC is omitted.

FIG. 19B depicts a set of example processes (p4, p5, p6) communicatingwith other processes (p7, p8, p9). As illustrated, most of nodes p4, p5,and p6 communicate with most of nodes p7, p8, and p9 (as indicated inFIG. 19B with solid connection lines). As one example, process p4communicates with process p7 (1952), process p8 (1954), and process p9(1956). An exception is process p6, which communicates with processes p7and p8, but does not communicate with process p9 (as indicated by dashedline 1958). If MNC were applied to the nodes depicted in FIG. 19B, nodesp4 and p5 would be clustered (and node p6 would not be included in theircluster).

One approach to similarity clustering is to use SimRank. In anembodiment of the SimRank approach, for a given node v in a directedgraph, I(v) and O(v) denote the respective set of in-neighbors andout-neighbors of v. Individual in-neighbors are denoted as I_(i)(v), forl≤i≤|I(v)|, and individual out-neighbors are denoted as O_(i)(v), for1≤i≤|O(v)|. The similarity between two objects a and b can be denoted bys(a,b)∈[1,0]. A recursive equation (hereinafter “the SimRank equation”)can be written for s(a,b), where, if a=b, then s(a,b) is defined as 1,otherwise,

${s\left( {a,b} \right)} = {\frac{C}{{{I(a)}}{{I(b)}}}{\sum\limits_{i = 1}^{{I{(a)}}}{\sum\limits_{j = 1}^{{I{(b)}}}{s\left( {{I_{i}(a)},{I_{j}(b)}} \right)}}}}$where C is a constant between 0 and 1. One example value for the decayfactor C is 0.8 (and a fixed number of iterations such as five). Anotherexample value for the decay factor C is 0.6 (and/or a different numberof iterations). In the event that a or b has no in-neighbors, similarityis set to s(a,b)=0, so the summation is defined to be 0 when I(a)=Ø orI(b)=Ø

The SimRank equations for a graph G can be solved by iteration to afixed point. Suppose n is the number of nodes in G. For each iterationk, n² entries s_(k)(*,*) are kept, where s_(k)(a,b) gives the scorebetween a and b on iteration k. Successive computations of s_(k+1)(*,*)are made based on s_(k)(*,*). Starting with s₀(*,*), where each s₀(a,b)is a lower bound on the actual SimRank score s(a,b):

${s_{0}\left( {a,b} \right)} = \left\{ \begin{matrix}{1,{{{if}\mspace{14mu} a} = b},} \\{0,{{{if}\mspace{14mu} a} \neq {b.}}}\end{matrix} \right.$

The SimRank equation can be used to compute s_(k+1)(a, b) froms_(k)(*,*) with

${s_{k + 1}\left( {a,b} \right)} = {\frac{C}{{{I(a)}}{{I(b)}}}{\sum\limits_{i = 1}^{{I{(a)}}}{\sum\limits_{j = 1}^{{I{(b)}}}{s_{k}\left( {{I_{i}(a)},{I_{j}(b)}} \right)}}}}$for a≠b, and s_(k+1) (a, b)=1 for a=b. On each iteration k+1, thesimilarity of (a,b) is updated using the similarity scores of theneighbors of (a,b) from the previous iteration k according to theSimRank equation. The values s_(k)(*,*) are nondecreasing as kincreases.

Returning to FIG. 19B, while MNC would cluster nodes p4 and p5 together(and not include node p6 in their cluster), application of SimRank wouldcluster nodes p4-p6 into one cluster (1960) and also cluster nodes p7-p9into another cluster (1962).

FIG. 19C depicts a set of processes, and in particular server processess1 and s2, and client processes c1, c2, c3, c4, c5, and c6. Suppose onlynodes s1, s2, c1, and c2 are present in the graph depicted in FIG. 19C(and the other nodes depicted are omitted from consideration). UsingMNC, nodes s1 and s2 would be clustered together, as would nodes c1 andc2. Performing SimRank clustering as described above would also resultin those two clusters (s1 and s2, and c1 and c2). As previouslymentioned, in MNC, identical behavior is required. Thus, if node c3 werenow also present in the graph, MNC would not include c3 in a clusterwith c2 and c1 because node c3 only communicates with node s2 and notnode s1. In contrast, a SimRank clustering of a graph that includesnodes s1, s2, c1, c2, and c3 would result (based, e.g., on an applicableselected decay value and number of iterations) in a first clustercomprising nodes s1 and s2, and a second cluster of c1, c2, and c3. Asan increasing number of nodes which communicate with server process s2,and do not also communicate with server process s1, are included in thegraph (e.g., as c4, c5, and c6 are added), under SimRank, nodes s1 ands2 will become decreasingly similar (i.e., their intersection isreduced).

In various embodiments, SimRank is modified (from what is describedabove) to accommodate differences between the asymmetry of client andserver connections. As one example, SimRank can be modified to usedifferent thresholds for client communications (e.g., an 80% match amongnodes c1-c6) and for server communications (e.g., a 60% match amongnodes s1 and s2). Such modification can also help achieve convergence insituations such as where a server process dies on one node and restartson another node.

c. Cluster Splitting (e.g., Based on Application)

The application of MNC/SimRank to an aggregated physical graph resultsin a smaller graph, in which processes which are determined to besufficiently similar are clustered together. Typically, clustersgenerated as output of MNC will be underinclusive. For example, for thenodes depicted in FIG. 19B, process p6 will not be included in a clusterwith processes p4 and p5, despite substantial similarity in theircommunication behaviors. The application of SimRank (e.g., to the outputof MNC) helps mitigate the underinclusiveness of MNC, but can result inoverly inclusive clusters. As one example, suppose (returning to thenodes depicted in FIG. 19A) that as a result of applying SimRank to thedepicted nodes, nodes p1-p4 are all included in a single cluster. BothMNC and SimRank operate agnostically of which application a givenprocess belongs to. Suppose processes p1-p3 each correspond to a firstapplication (e.g., an update engine), and process p4 corresponds to asecond application (e.g., sshd). Further suppose process p10 correspondsto contact with AWS. Clustering all four of the processes together(e.g., as a result of SimRank) could be problematic, particularly in asecurity context (e.g., where granular information useful in detectingthreats would be lost).

As previously mentioned, platform 102 maintains a mapping betweenprocesses and the applications to which they belong. In variousembodiments, the output of SimRank (e.g., SimRank clusters) is splitbased on the applications to which cluster members belong (such a splitis also referred to herein as a “CmdType split”). If all cluster membersshare a common application, the cluster remains. If different clustermembers originate from different applications, the cluster members aresplit along application-type (CmdType) lines. Using the nodes depictedin FIG. 19C as an example, suppose that nodes c1, c2, c3, and c5 allshare “update engine” as the type of application to which they belong(sharing a CmdType). Suppose that node c4 belongs to “ssh,” and supposethat node c6 belongs to “bash.” As a result of SimRank, all six nodes(c1-c6) might be clustered into a single cluster. After a CmdType splitis performed on the cluster, however, the single cluster will be brokeninto three clusters (c1, c2, c3, c5; c4; and c6). Specifically, theresulting clusters comprise processes associated with the same type ofapplication, which exhibit similar behaviors (e.g., communicationbehaviors). Each of the three clusters resulting from the CmdType splitrepresents, respectively, a node (also referred to herein as a PType) ofa particular CmdType. Each PType is given a persistent identifier andstored persistently as a cumulative graph.

A variety of approaches can be used to determine a CmdType for a givenprocess. As one example, for some applications (e.g., sshd), aone-to-one mapping exists between the CmdType and the application/binaryname. Thus, processes corresponding to the execution of sshd will beclassified using a CmdType of sshd. In various embodiments, a list ofcommon application/binary names (e.g., sshd, apache, etc.) is maintainedby platform 102 and manually curated as applicable. Other types ofapplications (e.g., Java, Python, and Ruby) are multi-homed, meaningthat several very different applications may all execute using thebinary name, “java.” For these types of applications, information suchas command line/execution path information can be used in determining aCmdType. In particular, the subapplication can be used as the CmdType ofthe application, and/or term frequency analysis (e.g., TF/IDF) can beused on command line information to group, for example, any marathonrelated applications together (e.g., as a python.marathon CmdType) andseparately from other Python applications (e.g., as a python.airflowCmdType).

In various embodiments, machine learning techniques are used todetermine a CmdType. The CmdType model is constrained such that theexecution path for each CmdType is unique. One example approach tomaking a CmdType model is a random forest based approach. An initialCmdType model is bootstrapped using process parameters (e.g., availablewithin one minute of process startup) obtained using one hour ofinformation for a given customer (e.g., ACME). Examples of suchparameters include the command line of the process, the command line ofthe process's parent(s) (if applicable), the uptime of the process,UID/EUID and any change information, TTY and any change information,listening ports, and children (if any). Another approach is to performterm frequency clustering over command line information to convertcommand lines into cluster identifiers.

The random forest model can be used (e.g., in subsequent hours) topredict a CmdType for a process (e.g., based on features of theprocess). If a match is found, the process can be assigned the matchingCmdType. If a match is not found, a comparison between features of theprocess and its nearest CmdType (e.g., as determined using a Levensteindistance) can be performed. The existing CmdType can be expanded toinclude the process, or, as applicable, a new CmdType can be created(and other actions taken, such as generating an alert). Another approachto handling processes which do not match an existing CmdType is todesignate such processes as unclassified, and once an hour, create a newrandom forest seeded with process information from a sampling ofclassified processes (e.g., 10 or 100 processes per CmdType) and the newprocesses. If a given new process winds up in an existing set, theprocess is given the corresponding CmdType. If a new cluster is created,a new CmdType can be created.

d. Graph Behavior Model (GBM) i. GBM Overview Concept

Conceptually, a polygraph represents the smallest possible graph ofclusters that preserve a set of rules (e.g., in which nodes included inthe cluster must share a CmdType and behavior). As a result ofperforming MNC, SimRank, and cluster splitting (e.g., CmdType splitting)many processes are clustered together based on commonality of behavior(e.g., communication behavior) and commonality of application type. Suchclustering represents a significant reduction in graph size (e.g.,compared to the original raw physical graph). Nonetheless, furtherclustering can be performed (e.g., by iterating on the graph data usingthe GBM to achieve such a polygraph). As more information within thegraph is correlated, more nodes can be clustered together, reducing thesize of the graph, until convergence is reached and no furtherclustering is possible.

FIG. 19D depicts two pairs of clusters. In particular, cluster 1964represents a set of client processes sharing the same CmdType (“a1”),communicating (collectively) with a server process having a CmdType(“a2”). Cluster 1968 also represents a set of client processes having aCmdType a1 communicating with a server process having a CmdType a2. Thenodes in clusters 1964 and 1968 (and similarly nodes in 1966 and 1970)remain separately clustered (as depicted) after MNC/SimRank/CmdTypesplitting—isolated islands. One reason this could occur is where serverprocess 1966 corresponds to processes executing on a first machine(having an IP address of 1.1.1.1). The machine fails and a new serverprocess 1970 starts, on a second machine (having an IP address of2.2.2.2) and takes over for process 1966.

Communications between a cluster of nodes (e.g., nodes 1964) and thefirst IP address can be considered different behavior fromcommunications between the same set of nodes and the second IP address,and thus communications 1972 and 1974 will not be combined byMNC/SimRank in various embodiments. Nonetheless, it could be desirablefor nodes 1964/1968 to be combined (into cluster 1976), and for nodes1966/1970 to be combined (into cluster 1978), as representing(collectively) communications between a1 and a2. One task that can beperformed by platform 102 is to use DNS query information to map IPaddresses to logical entities. As will be described in more detailbelow, GBM 154 can make use of the DNS query information to determinethat graph nodes 1964 and graph nodes 1968 both made DNS queries for“appserverabc.example.com,” which first resolved to 1.1.1.1 and then to2.2.2.2, and to combine nodes 1964/1968 and 1966/1970 together into asingle pair of nodes (1976 communicating with 1978).

In various embodiments, GBM 154 operates in a batch manner in which itreceives as input the nodes and edges of a graph for a particular timeperiod along with its previous state, and generates as output clusterednodes, cluster membership edges, cluster-to-cluster edges, events, andits next state.

GBM 154 does not try to consider all types of entities and theirrelationships that may be available in a conceptual common graph all atonce. Instead, GBM uses a concept of models where a subset of node andedge types and their properties are considered in a given model. Such anapproach is helpful for scalability, and also to help preserve detailedinformation (of particular importance in a security context)—asclustering entities in a more complex and larger graph could result inless useful results. In particular, such an approach allows fordifferent types of relationships between entities to be preserved/moreeasily analyzed.

While GBM 154 can be used with different models corresponding todifferent subgraphs, core abstractions remain the same across types ofmodels:

Each node type in a GBM model is considered to belong to a class. Theclass can be thought of as a way for the GBM to split nodes based on thecriteria it uses for the model. The class for a node is represented as astring whose value is derived from the node's key and propertiesdepending on the GBM Model. Note that different GBM models may createdifferent class values for the same node. For each node type in a givenGBM model, GBM 154 can generate clusters of nodes for that type. A GBMgenerated cluster for a given member node type cannot span more than oneclass for that node type. GBM 154 generates edges between clusters thathave the same types as the edges between source and destination clusternode types.

The processes described herein as being used for a particular model canbe used (can be the same) across models, and different models can alsobe configured with different settings.

The node types and the edge types may correspond to existing types inthe common graph node and edge tables but this is not necessary. Evenwhen there is a correspondence, the properties provided to GBM 154 arenot limited to the properties that are stored in the corresponding graphtable entries. They can be enriched with additional information beforebeing passed to GBM 154.

Graph Input

Logically, the input for a GBM model can be characterized in a mannerthat is similar to other graphs. Edge triplets can be expressed, forexample, as an array of source node type, edge type, and destinationnode type. And, each node type is associated with node properties, andeach edge type is associated with edge properties. Other edge tripletscan also be used (and/or edge triplets can be extended) in accordancewith various embodiments.

Note that the physical input to the GBM model need not (and does not, invarious embodiments) conform to the logical input. For example, theedges in the PtypeConn model correspond to edges between MatchingNeighbors (MN) clusters, where each process node has an MN clusteridentifier property. In the User ID to User ID model (also referred toherein as the Uid2Uid model), edges are not explicitly providedseparately from nodes (as the euid array in the node properties servesthe same purpose). In both cases, however, the physical informationprovides the applicable information necessary for the logical input.

State Input

The state input for a particular GBM model can be stored in a file, adatabase, or other appropriate storage. The state file (from a previousrun) is provided, along with graph data, except for when the first runfor a given model is performed, or the model is reset. In some cases, nodata may be available for a particular model in a given time period, andGBM may not be run for that time period. As data becomes available at afuture time, GBM can run using the latest state file as input.

Graph Output

GBM 154 outputs cluster nodes, cluster membership edges, andinter-cluster relationship edges that are stored (in some embodiments)in the graph node tables: node_c, node_cm, and node_icr, respectively.The type names of nodes and edges conform to the following rules:

A given node type can be used in multiple different GBM models. The typenames of the cluster nodes generated by two such models for that nodetype will be different. For instance, process type nodes will appear inboth PtypeConn and Uid2Uid models, but their cluster nodes will havedifferent type names.

The membership edge type name is “MemberOf.”

The edge type names for cluster-to-cluster edges will be the same as theedge type names in the underlying node-to-node edges in the input.

Event Types

The following are example events GBM 154 can generate:

new class

new cluster

new edge from class to class

split class (the notion that GBM 154 considers all nodes of a given typeand class to be in the same cluster initially and if GBM 154 splits theminto multiple clusters, it is splitting a class)

new edge from cluster and class

new edge between cluster and cluster

new edge from class to cluster

One underlying node or edge in the logical input can cause multipletypes of events to be generated. Conversely, one event can correspond tomultiple nodes or edges in the input. Not every model generates everyevent type.

ii. GBM Models

Additional information regarding examples of data structures/models thatcan be used in conjunction with models used by platform 102 is providedin this section.

PTypeConn Model

This model clusters nodes of the same class that have similarconnectivity relationships. For example, if two processes had similarincoming neighbors of the same class and outgoing neighbors of the sameclass, they could be clustered.

The node input to the PTypeConn model for a given time period includesnon-interactive (i.e., not associated with tty) process nodes that hadconnections in the time period and the base graph nodes of other types(IP Service Endpoint (IPSep) comprising an IP address and a port), DNSService Endpoint (DNSSep) and IPAddress) that have been involved inthose connections. The base relationship is the connectivityrelationship for the following type triplets:

Process, ConnectedTo, Process

Process, ConnectedTo, IP Service Endpoint (IPSep)

Process, ConnectedTo, DNS Service Endpoint (DNSSep)

IPAddress, ConnectedTo, ProcessProcess, DNS, ConnectedTo, Process

The edge inputs to this model are the ConnectedTo edges from the MNcluster, instead of individual node-to-node ConnectedTo edges from thebase graph. The membership edges created by this model refer to the basegraph node type provided in the input.

Class Values:

The class values of nodes are determined as follows depending on thenode type (e.g., Process nodes, IPSep nodes, DNSSep nodes, and IPAddress nodes).

Process Nodes:

if exe_path contains java then “java <cmdline_term_1> . . . ”

else if exe_path contains python then “python <cmdline_term_1> . . . ”

else “last_part of exe_path”

IPSep Nodes:

if IP_internal then “IntIPS”

else if severity=0 then “<IP_addr>:<protocol>:<port>”

else “<IP_addr>:<port>_BadIP”

DNSSep Nodes:

if IP_internal=1 then “<hostname>”

else if severity=0 then “<hostname>:<protocol>:port”

else “<hostname>:<port>_BadIP”

IPAddress nodes (will appear only on client side):

if IP_internal=1 then “IPIntC”

else if severity=0 then “ExtIPC”

else “ExtBadIPC”

Events:

A new class event in this model for a process node is equivalent toseeing a new CType being involved in a connection for the first time.Note that this does not mean the CType was not seen before. It ispossible that it was previously seen but did not make a connection atthat time.

A new class event in this model for an IPSep node with IP_internal=0 isequivalent to seeing a connection to a new external IP address for thefirst time.

A new class event in this model for a DNSSep node is equivalent toseeing a connection to a new domain for the first time.

A new class event in this model for an IPAddress node with IP_internal=0and severity=0 is equivalent to seeing a connection from any external IPaddress for the first time.

A new class event in this model for an IPAddress node with IP_internal=0and severity >0 is equivalent to seeing a connection from any badexternal IP address for the first time.

A new class to class to edge from a class for a process node to a classfor a process node is equivalent to seeing a communication from thesource CType making a connection to the destination CType for the firsttime.

A new class to class to edge from a class for a process node to a classfor a DNSSep node is equivalent to seeing a communication from thesource CType making a connection to the destination domain name for thefirst time.

IntPConn Model

This model is similar to the PtypeConn Model, except that connectionedges between parent/child processes and connections between processeswhere both sides are not interactive are filtered out.

Uid2Uid Model

This model clusters processes with the same username that show similarprivilege change behavior. For instance, if two processes with the sameusername had similar effective user values, launched processes withsimilar usernames, and were launched by processes with similarusernames, then they could be clustered.

An edge between a source cluster and destination cluster generated bythis model means that all of the processes in the source cluster had aprivilege change relationship to at least one process in the destinationcluster.

The node input to this model for a given time period includes processnodes that are running in that period. The value of a class of processnodes is “<username>”.

The base relationship that is used for clustering is privilege change,either by the process changing its effective user ID, or by launching achild process which runs with a different user.

The physical input for this model includes process nodes (only), withthe caveat that the complete ancestor hierarchy of process nodes active(i.e., running) for a given time period is provided as input even if anancestor is not active in that time period. Note that effective user IDsof a process are represented as an array in the process node properties,and launch relationships are available from ppid_hash fields in theproperties as well.

A new class event in this model is equivalent to seeing a user for thefirst time.

A new class to class edge event is equivalent to seeing the source usermaking a privilege change to the destination user for the first time.

Ct2Ct Model

This model clusters processes with the same CType that show similarlaunch behavior. For instance, if two processes with the same CType havelaunched processes with similar CTypes, then they could be clustered.

The node input to this model for a given time period includes processnodes that are running in that period. The value class of process nodesis CType (similar to how it is created for the PtypeConn Model).

The base relationship that is used for clustering is a parent processwith a given CType launching a child process with another givendestination CType.

The physical input for this model includes process nodes (only) with thecaveat that the complete ancestor hierarchy active process nodes (i.e.,that are running) for a given time period is provided as input even ifan ancestor is not active in that time period. Note that launchrelationships are available from ppid_hash fields in the process nodeproperties.

An edge between a source cluster and destination cluster generated bythis model means that all of the processes in the source clusterlaunched at least one process in the destination cluster.

A new class event in this model is equivalent to seeing a CType for thefirst time. Note that the same type of event will be generated by thePtypeConn Model as well.

A new class to class edge event is equivalent to seeing the source CTypelaunching the destination CType for the first time.

MTypeConn Model

This model clusters nodes of the same class that have similarconnectivity relationships. For example, if two machines had similarincoming neighbors of the same class and outgoing neighbors of the sameclass, they could be clustered.

A new class event in this model will be generated for external IPaddresses or (as applicable) domain names seen for the first time. Notethat a new class to class to edge Machine, class to class for an IPSepor DNSName node will also be generated at the same time.

The membership edges generated by this model will refer to Machine,IPAddress, DNSName, and IPSep nodes in the base graph. Though the nodesprovided to this model are IPAddress nodes instead of IPSep nodes, themembership edges it generates will refer to IPSep type nodes.Alternatively, the base graph can generate edges between Machine andIPSep node types. Note that the Machine to IPAddress edges havetcp_dst_ports/udp_dst_ports properties that can be used for thispurpose.

The node input to this model for a given time period includes machinenodes that had connections in the time period and the base graph nodesof other types (IPAddress and DNSName) that were involved in thoseconnections.

The base relationship is the connectivity relationship for the followingtype triplets:

Machine, ConnectedTo, Machine

Machine, ConnectedTo, IPAddress

Machine, ConnectedTo, DNSName

IPAddress, ConnectedTo, Machine, DNS, ConnectedTo, Machine

The edge inputs to this model are the corresponding ConnectedTo edges inthe base graph.

Class Values:

Machine:

The class value for all Machine nodes is “Machine.”

The machine_terms property in the Machine nodes is used, in variousembodiments, for labeling machines that are clustered together. If amajority of the machines clustered together share a term in themachine_terms, that term can be used for labeling the cluster.

IPSep:

The class value for IPSep nodes is determined as follows:

if IP_internal then “IntIPS”

else

if severity=0 then “<ip_addr>:<protocol>:<port>”

else “<IP_addr_BadIP>”

IPAddress:

The class value for IpAddress nodes is determined as follows:

if IP_internal then “IntIPC”

else

if severity=0 then “ExtIPC”

else “ExtBadIPC”

DNSName:

The class value for DNSName nodes is determined as follows:

if severity=0 then “<hostname>”

else then “<hostname>_BadIP”

iii. GBM Event Types New Class Event

Structure:

The key field for this event type looks as follows (using the PtypeConnmodel as an example):

{

“node”: {

-   -   “class”: {        -   “cid”: “httpd”    -   },    -   “key”: {        -   “cid”: “29654”    -   },    -   “type”: “PtypeConn”

}

}

It contains the class value and also the ID of the cluster where thatclass value is observed. Multiple clusters can be observed with the samevalue in a given time period. Accordingly, in some embodiments, GBM 154generates multiple events of this type for the same class value.

The properties field looks as follows:

{

“set_size”: 5

}

The set_size indicates the size of the cluster referenced in the keysfield.

Conditions:

For a given model and time period, multiple NewClass events can begenerated if there is more than one cluster in that class. NewNodeevents will not be generated separately in this case.

New Class to Class Edge Event

Structure:

The key field for this event type looks as follows (using the PtypeConnmodel as an example):

“edge”: {

-   -   “dst_node”: {        -   “class”: {            -   “cid”: “java war”        -   },        -   “key”: {            -   “cid”: “27635”        -   },        -   “type”: “PtypeConn”    -   },    -   “src_node”: {        -   “class”: {            -   “cid”: “IntIPC”        -   },        -   “key”: {            -   “cid”: “20881”        -   },        -   “type”: “PtypeConn”    -   },    -   “type”: “ConnectedTo”

}

}

The key field contains source and destination class values and alsosource and destination cluster identifiers (i.e., thesrc/dst_node:key.cid represents the src/dst cluster identifier).

In a given time period for a given model, an event of this type couldinvolve multiple edges between different cluster pairs that have thesame source and destination class values. GBM 154 can generate multipleevents in this case with different source and destination clusteridentifiers.

The props fields look as follows for this event type:

{

-   -   “dst_set_size”: 2,    -   “src_set_size”: 1        }

The source and destination sizes represent the sizes of the clustersgiven in the keys field.

Conditions:

For a given model and time period, multiple NewClassToClass events canbe generated if there are more than one pair of clusters in that classpair. NewNodeToNode events are not generated separately in this case.

iv. Combining Events at the Class Level

For a given model and time period, the following example types of eventscan represent multiple changes in the underlying GBM cluster level graphin terms of multiple new clusters or multiple new edges betweenclusters:

NewClass

NewEdgeClassToClass

NewEdgeNodeToClass

NewEdgeClassToNode

Multiple NewClass events with the same model and class can be output ifthere are multiple clusters in that new class.

Multiple NewEdgeClassToClass events with the same model and class paircan be output if there are multiple new cluster edges within that classpair.

Multiple NewEdgeNodeToClass events with the same model and destinationclass can be output if there are multiple new edges from the sourcecluster to the destination clusters in that destination class (the firsttime seeing this class as a destination cluster class for the sourcecluster).

Multiple NewEdgeClassToNode events with the same model and source classcan be output if there are multiple new edges from source clusters tothe destination clusters in that source class (the first time seeingthis class as a source cluster class for the destination cluster).

These events may be combined at the class level and treated as a singleevent when it is desirable to view changes at the class level, e.g.,when one wants to know when there is a new CType.

Also note that different models may have partial overlap in the types ofnodes they use from the base graph. Therefore, they can generateNewClass type events for the same class. NewClass events can also becombined across models when it is desirable to view changes at the classlevel.

III. Extended User Session Tracking

Using techniques herein, actions can be associated with processes and(e.g., by associating processes with users) actions can thus also beassociated with extended user sessions. Such information can be used totrack user behavior correctly, even where a malicious user attempts tohide his trail by changing user identities (e.g., through lateralmovement). Extended user session tracking can also be useful inoperational use cases without malicious intent, e.g., where users makeoriginal logins with distinct usernames (e.g., “charlie” or “dave”) butthen perform actions under a common username (e.g., “admin” or“support”). One such example is where multiple users with administratorprivileges exist, and they need to gain superuser privilege to perform aparticular type of maintenance. It may be desirable to know whichoperations are performed (as the superuser) by which original user whendebugging issues. In the following examples describing extended usersession tracking, reference is generally made to using the secure shell(ssh) protocol as implemented by openssh (on the server side) as themechanism for logins. However, extended user session tracking is notlimited to the ssh protocol or a particular limitation and thetechniques described herein can be extended to other login mechanisms.

On any given machine, there will be a process that listens for andaccepts ssh connections on a given port. This process can run theopenssh server program running in daemon mode or it could be runninganother program (e.g., initd on a Linux system). In either case, a newprocess running openssh will be created for every new ssh login sessionand this process can be used to identify an ssh session on that machine.This process is called the “privileged” process in openssh.

After authentication of the ssh session, when an ssh client requests ashell or any other program to be run under that ssh session, a newprocess that runs that program will be created under (i.e., as a childof) the associated privileged process. If an ssh client requests portforwarding to be performed, the connections will be associated with theprivileged process.

In modern operating systems such as Linux and Windows, each process hasa parent process (except for the very first process) and when a newprocess is created the parent process is known. By tracking theparent-child hierarchy of processes, one can determine if a particularprocess is a descendant of a privileged openssh process and thus if itis associated with an ssh login session.

For user session tracking across machines (or on a single machine withmultiple logins) in a distributed environment, it is established whentwo login sessions have a parent-child relationship. After that, the“original” login session, if any, for any given login session can bedetermined by following the parent relationship recursively.

FIG. 20 is a representation of a user logging into a first machine andthen into a second machine from the first machine, as well asinformation associated with such actions. In the example of FIG. 20, auser, Charlie, logs into Machine A (2002) from a first IP address(2004). As part of the login process, he provides a username (2006).Once connected to Machine A, an openssh privileged process (2008) iscreated to handle the connection for the user, and a terminal session iscreated and a bash process (2010) is created as a child. Charlielaunches an ssh client (2012) from the shell, and uses it to connect(2014) to Machine B (2016). As with the connection he makes to MachineA, Charlie's connection to Machine B will have an associated incoming IPaddress (2018), in this case, the IP address of Machine A. And, as partof the login process with Machine B, Charlie will provide a username(2020) which need not be the same as username 2006. An opensshprivileged process (2022) is created to handle the connection, and aterminal session and child bash process (2024) will be created. From thecommand line of Machine B, Charlie launches a curl command (2026), whichopens an HTTP connection (2028) to an external Machine C (2030).

FIG. 21 is an alternate representation of actions occurring in FIG. 20,where events occurring on Machine A are indicated along line 2102, andevents occurring on Machine B are indicated along line 2104. As shown inFIG. 21, an incoming ssh connection is received at Machine A (2106).Charlie logs in (as user “x”) and an ssh privileged process is createdto handle Charlie's connection (2108). A terminal session is created anda bash process is created (2110) as a child of process 2108. Charliewants to ssh to Machine B, and so executes an ssh client on Machine A(2112), providing credentials (as user “y”) at 2114. Charlie logs intoMachine B, and an ssh privileged process is created to handle Charlie'sconnection (2116). A terminal session is created and a bash process iscreated (2118) as a child of process 2116. Charlie then executes curl(2120) to download content from an external domain (via connection2122).

The external domain could be a malicious domain, or it could be benign.Suppose the external domain is malicious (and, e.g., Charlie hasmalicious intent). It would be advantageous (e.g., for security reasons)to be able to trace the contact with the external domain back to MachineA, and then back to Charlie's IP address. Using techniques describedherein (e.g., by correlating process information collected by variousagents), such tracking of Charlie's activities back to his originallogin (2000) can be accomplished. In particular, an extended usersession can be tracked that associates Charlie's ssh processes togetherwith a single original login and thus original user.

A. Data Model

As previously explained, software agents (such as agent 112) run onmachines (such as machine 116) and detect new connections, processes,and logins. As also previously explained, such agents send associatedrecords to platform 102 which includes one or more datastores (e.g.,database 142) for persistently storing such data. Such data can bemodeled using logical tables, also persisted in datastores (e.g., in arelational database that provides an SQL interface), allowing forquerying of the data. Other datastores such as graph oriented databasesand/or hybrid schemes can also be used.

1. Common Identifiers

The following identifiers are commonly used in the tables:

MID

PID_hash

An ssh login session can be identified uniquely by an (MID, PID_hash)tuple. The MID is a machine identifier that is unique to each machine,whether physical or virtual, across time and space. Operating systemsuse numbers called process identifiers (PIDs) to identify processesrunning at a given time. Over time processes may die and new processesmay be started on a machine or the machine itself may restart. The PIDis not necessarily unique across time in that the same PID value can bereused for different processes at different times. In order to trackprocess descendants across time, one should therefore account for timeas well. In order to be able to identify a process on a machine uniquelyacross time, another number called a PID_hash is generated for theprocess. In various embodiments, the PID_hash is generated using acollision-resistant hash function that takes the PID, start time, and(in various embodiments, as applicable) other properties of a process.

2. Input Data Model

Input data collected by agents comprises the input data model and isrepresented by the following logical tables:

connections

processes

logins

a. Connections Table

The connections table maintains records of TCP/IP connections observedon each machine. Example columns included in a connections table are asfollows:

Column Name Description MID Identifier of the machine that theconnection was observed on. start_time Connection start time. PID_hashIdentifier of the process that was associated with the connection.src_IP_addr Source IP address (the connection was initiated from this IPaddress). src_port Source port. dst_IP_addr Destination IP address (theconnection was made to this IP address). dst_port Destination port. ProtProtocol (TCP or UDP). Dir Direction of the connection (incoming oroutgoing) with respect to this machine.

The source fields (IP address and port) correspond to the side fromwhich the connection was initiated. On the destination side, the agentassociates an ssh connection with the privileged ssh process that iscreated for that connection.

For each connection in the system, there will be two records in thetable, assuming that the machines on both sides of the connectioncapture the connection. These records can be matched based on equalityof the tuple (src_IP_addr, src_port, dst_IP_addr, dst_port, Prot) andproximity of the start_time fields (e.g., with a one minute upperthreshold between the start_time fields).

b. Processes Table

The processes table maintains records of processes observed on eachmachine. It has the following columns:

Column Name Description MID Identifier of the machine that the processwas observed on. PID_hash Identifier of the process. start_time Starttime of the process. exe_path The executable path of the process.PPID_hash Identifier of the parent process.

c. Logins Table

The logins table maintains records of logins to the machines. It has thefollowing columns:

Column Name Description MID Identifier of the machine that the login wasobserved on. sshd_PID_hash Identifier of the sshd privileged processassociated with login. login_time Time of login. login_username Usernameused in login.

3. Output Data Model

The output data generated by session tracking is represented with thefollowing logical tables:

login-local-descendant

login-connection

login-lineage

Using data in these tables, it is possible to determine descendantprocesses of a given ssh login session across the environment (i.e.,spanning machines). Conversely, given a process, it is possible todetermine if it is an ssh login descendant as well as the original sshlogin session for it if so.

a. Login-Local-Descendant Table

The login-local-descendant table maintains the local (i.e., on the samemachine) descendant processes of each ssh login session. It has thefollowing columns:

Column Name Description MID Identifier of the machine that the login wasobserved on. sshd_PID_hash Identifier of the sshd privileged processassociated with login. login_time Time of login. login_username Usernameused in login.

b. Login-Connections Table

The login-connections table maintains the connections associated withssh logins. It has the following columns:

Column Name Description MID Identifier of the machine that the processwas observed on. sshd_PID_hash Identifier of the sshd privileged processassociated with the login. login_time Time of login. login_username Theusername used in the login. src_IP_addr Source IP address (connectionwas initiated from this IP address). src_port Source port. dst_IP_addrDestination IP address (connection was made to this IP address).dst_port Destination port.

c. Login-Lineage Table

The login-lineage table maintains the lineage of ssh login sessions. Ithas the following columns:

ColumnName Description MID Identifier of the machine that the ssh loginwas observed on. sshd_PID_hash Identifier of the sshd privileged processassociated with the login. parent_MID Identifier of the machine that theparent ssh login was observed on. parent_sshd_PID_hash Identifier of thesshd privileged process associated with the parent login. origin_MIDIdentifier of the machine that the origin ssh login was observed on.origin_sshd_PID_hash Identifier of the sshd privileged processassociated with the origin login.

The parent_MID and parent sshd_PID_hash columns can be null if there isno parent ssh login. In that case, the (MID, sshd_PID_hash) tuple willbe the same as the (origin_MID, origin sshd_PID_hash) tuple.

B. Example Processing

FIG. 22 illustrates an example of a process for performing extended usertracking. In various embodiments, process 2200 is performed by platform102. The process begins at 2202 when data associated with activitiesoccurring in a network environment (such as ACME's datacenter) isreceived. One example of such data that can be received at 2202 isagent-collected data described above (e.g., in conjunction with process200). At 2204, the received network activity is used to identify userlogin activity. And, at 2206, a logical graph that links the user loginactivity to at least one user and at least one process is generated (orupdated, as applicable). Additional detail regarding process 2200, andin particular, portions 2204 and 2206 of process 2200 are described inmore detail below (e.g., in conjunction with discussion of FIG. 24).

FIG. 23 depicts a representation of a user logging into a first machine,then into a second machine from the first machine, and then making anexternal connection. The scenario depicted in FIG. 23 is used todescribe an example of processing that can be performed on datacollected by agents to generate extended user session trackinginformation. FIG. 23 is an alternate depiction of the information shownin FIGS. 20 and 21.

At time t1 (2302), a first ssh connection is made to Machine A (2304)from an external source (2306) by a user having a username of “X.” Inthe following example, suppose the external source has an IP address of1.1.1.10 and uses source port 10000 to connect to Machine A (which hasan IP address of 2.2.2.20 and a destination port 22). External source2306 is considered an external source because its IP address is outsideof the environment being monitored (e.g., is a node outside of ACME'sdatacenter, connecting to a node inside of ACME's datacenter).

A first ssh login session LS1 is created on machine A for user X. Theprivileged openssh process for this login is A1 (2308). Under the loginsession LS1, the user creates a bash shell process with PID_hash A2(2310).

At time t2 (2312), inside the bash shell process A2, the user runs anssh program under a new process A3 (2314) to log in to machine B (2316)with a different username (“Y”). In particular, an ssh connection ismade from source IP address 2.2.2.20 and source port 10001 (Machine A'ssource information) to destination IP address 2.2.2.21 and destinationport 22 (Machine B's destination information).

A second ssh login session LS2 is created on machine B for user Y. Theprivileged openssh process for this login is B1 (2318). Under the loginsession LS2, the user creates a bash shell process with PID_hash B2(2320).

At time t3 (2324), inside the bash shell process B2, the user runs acurl command under a new process B3 (2326) to download a file from anexternal destination (2328). In particular, an HTTPS connection is madefrom source IP address 2.2.2.21 and source port 10002 (Machine B'ssource information) to external destination IP address 3.3.3.30 anddestination port 443 (the external destination's information).

Using techniques described herein, it is possible to determine theoriginal user who initiated the connection to external destination 2328,which in this example is a user having the username X on machine A(where the extended user session can be determined to start with sshlogin session LS1).

Based on local descendant tracking, the following determinations can beon machine A and B without yet having performed additional processing(described in more detail below):

A3 is a descendant of A1 and thus associated with LS1.

The connection to the external domain from machine B is initiated by B3.

B3 is a descendant of B1 and is thus associated with LS2.

Connection to the external domain is thus associated with LS2.

An association between A3 and LS2 can be established based on the factthat LS2 was created based on an ssh connection initiated from A3.Accordingly, it can be determined that LS2 is a child of LS1.

To determine the user responsible for making the connection to theexternal destination (e.g., if it were a known bad destination), first,the process that made the connection would be traced, i.e., from B3 toLS2. Then LS2 would be traced to LS1 (i.e., LS1 is the origin loginsession for LS2). Thus the user for this connection is the user for LS1,i.e., X. As represented in FIG. 23, one can visualize the tracing byfollowing the links (in the reverse direction of arrows) from externalsource 2328 to A1 (2308).

In the example scenario, it is assumed that both ssh connections occurin the same analysis period. However, the approaches described hereinwill also work for connections and processes that are created indifferent time periods.

FIG. 24 illustrates an example of a process for performing extended usertracking. In various embodiments, process 2400 is performed periodically(e.g., once an hour in a batch fashion) by ssh tracker 148 to generatenew output data. In general, batch processing allows for efficientanalysis of large volumes of data. However, the approach can be adapted,as applicable, to process input data on a record-by-record fashion whilemaintaining the same logical data processing flow. As applicable theresults of a given portion of process 2400 are stored for use in asubsequent portion.

The process begins at 2402 when new ssh connection records areidentified. In particular, new ssh connections started during thecurrent time period are identified by querying the connections table.The query uses filters on the start_time and dst_port columns. Thevalues of the range filter on the start_time column are based on thecurrent time period. The dst_port column is checked against sshlistening port(s). By default, the ssh listening port number is 22.However, as this could vary across environments, the port(s) thatopenssh servers are listening to in the environment can be determined bydata collection agents dynamically and used as the filter value for thedst_port as applicable. In the scenario depicted in FIG. 23, the queryresult will generate the records shown in FIG. 25A. Note that for theconnection between machine A and B, the two machines are likely toreport start_time values that are not exactly the same but close enoughto be considered matching (e.g., within one minute or anotherappropriate amount of time). In the above table, they are shown to bethe same for simplicity.

At 2404, ssh connection records reported from source and destinationsides of the same connection are matched. The ssh connection records(e.g., returned from the query at 2402) are matched based on thefollowing criteria:

The five tuples (src_IP, dst_IP, IP_prot, src_port, dst_port) of theconnection records must match.

The delta between the start times of the connections must be within alimit that would account for the worst case clock difference expectedbetween two machines in the environment and typical connection setuplatency.

If there are multiple matches possible, then the match with the smallesttime delta is chosen.

Note that record 2502 from machine A for the incoming connection fromthe external source cannot be matched with another record as there is anagent only on the destination side for this connection. Example outputof portion 2404 of process 2400 is shown in FIG. 25B. The values in thedst_PID_hash column (2504) are that of the sshd privileged processassociated with ssh logins.

At 2406, new logins during the current time period are identified byquerying the logins table. The query uses a range filter on thelogin_time column with values based on the current time period. In theexample depicted in FIG. 23, the query result will generate the recordsdepicted in FIG. 25C.

At 2408, matched ssh connection records created at 2404 and new loginrecords created at 2406 are joined to create new records that willeventually be stored in the login-connection table. The join conditionis that dst_MID of the matched connection record is equal to the MID ofthe login record and the dst_PID_hash of the matched connection recordis equal to the sshd_PID_hash of the login record. In the exampledepicted in FIG. 23, the processing performed at 2408 will generate therecords depicted in FIG. 25D.

At 2410, login-local-descendant records in the lookback time period areidentified. It is possible that a process that is created in a previoustime period makes an ssh connection in the current analysis batchperiod. Although not depicted in the example illustrated in FIG. 23,consider a case where bash process A2 does not create ssh process A3right away but instead that the ssh connection A3 later makes to machineB is processed in a subsequent time period than the one where A2 wasprocessed. While processing this subsequent time period in whichprocesses A3 and B1 are seen, knowledge of A2 would be useful inestablishing that B1 is associated with A3 (via ssh connection) which isassociated with A2 (via process parentage) which in turn would be usefulin establishing that the parent of the second ssh login is the first sshlogin. The time period for which look back is performed can be limitedto reduce the amount of historical data that is considered. However,this is not a requirement (and the amount of look back can bedetermined, e.g., based on available processing resources). The loginlocal descendants in the lookback time period can be identified byquerying the login-local-descendant table. The query uses a range filteron the login_time column where the range is fromstart_time_of_current_period-lookback_time tostart_time_of_current_period. (No records as a result of performing 2410on the scenario depicted in FIG. 23 are obtained, as only a single timeperiod is applicable in the example scenario.)

At 2412, new processes that are started in the current time period areidentified by querying the processes table. The query uses a rangefilter on the start_time column with values based on the current timeperiod. In the example depicted in FIG. 23, the processing performed at2412 will generate the records depicted in FIG. 25E.

At 2414, new login-local-descendant records are identified. The purposeis to determine whether any of the new processes in the current timeperiod are descendants of an ssh login process and if so to createrecords that will be stored in the login-local-descendant table forthem. In order to do so, the parent-child relationships between theprocesses are recursively followed. Either a top down or bottom upapproach can be used. In a top down approach, the ssh local descendantsin the lookback period identified at 2410, along with new ssh loginprocesses in the current period identified at 2408 are considered aspossible ancestors for the new processes in the current periodidentified at 2412.

Conceptually, the recursive approach can be considered to includemultiple sub-steps where new processes that are identified to be sshlocal descendants in the current sub-step are considered as ancestorsfor the next step. In the example scenario depicted in FIG. 23, thefollowing descendancy relationships will be established in twosub-steps:

Sub-step 1:

Process A2 is a local descendant of LS1 (i.e., MID=A, sshd_PID_hash=A1)because it is a child of process A1 which is the login process for LS1.

Process B2 is a local descendant of LS2 (i.e., MID=B, sshd_PID_hash=B1)because it is a child of process B1 which is the login process for LS2.

Sub-step 2:

Process A3 is a local descendant of LS1 because it is a child of processA2 which is associated to LS1 in sub-step 1.

Process B3 is a local descendant of LS2 because it is a child of processB1 which is associated to LS2 in sub-step 1.

Implementation portion 2414 can use a datastore that supports recursivequery capabilities, or, queries can be constructed to process multipleconceptual sub-steps at once. In the example depicted in FIG. 23, theprocessing performed at 2414 will generate the records depicted in FIG.25F. Note that the ssh privileged processes associated with the loginsare also included as they are part of the login session.

At 2416, the lineage of new ssh logins created in the current timeperiod is determined by associating their ssh connections to sourceprocesses that may be descendants of other ssh logins (which may havebeen created in the current period or previous time periods). In orderto do so, first an attempt is made to join the new ssh login connectionsin the current period (identified at 2408) with the combination of thelogin local descendants in the lookback period (identified at 2410) andthe login local descendants in the current time period (identified at2412). This will create adjacency relationships between child and parentlogins. In the example depicted in FIG. 23, the second ssh loginconnection will be associated with process A3 and an adjacencyrelationship between the two login sessions will be created (asillustrated in FIG. 25G).

Next, the adjacency relationships are used to find the original loginsessions. While not shown in the sample scenario, there could bemultiple ssh logins in a chain in the current time period, in which casea recursive approach (as in 2414) could be used. At the conclusion ofportion 2416, the login lineage records depicted in FIG. 25H will begenerated.

Finally, at 2418, output data is generated. In particular, the newlogin-connection, login-local-descendant, and login-lineage recordsgenerated at 2408, 2414, and 2416 are inserted into their respectiveoutput tables (e.g., in a transaction manner).

An alternate approach to matching TCP connections between machinesrunning an agent is for the client to generate a connection GUID andsend it in the connection request (e.g., the SYN packet) it sends andfor the server to extract the GUID from the request. If two connectionrecords from two machines have the same GUID, they are for the sameconnection. Both the client and server will store the GUID (if ifexists) in the connection records they maintain and report. On theclient side, the agent can configure the network stack (e.g. using IPtables functionality on Linux) to intercept an outgoing TCP SYN packetand modify it to add the generated GUID as a TCP option. On the serverside, the agent already extracts TCP SYN packets and thus can look forthis option and extract the GUID if it exists.

IV. Graph-Based User Tracking and Threat Detection

Administrators and other users of network environments (e.g., ACME'sdatacenter 104) often change roles to perform tasks. As one example,suppose that at the start of a workday, an administrator (hereinafter“Joe Smith”) logs in to a console, using an individualized account(e.g., username=joe.smith). Joe performs various tasks as himself (e.g.,answering emails, generating status reports, writing code, etc.). Forother tasks (e.g., performing updates), Joe may requiredifferent/additional permission than his individual account has (e.g.,root privileges). One way Joe can gain access to such permissions is byusing sudo, which will allow Joe to run a single command with rootprivileges. Another way Joe can gain access to such permissions is by suor otherwise logging into a shell as root. After gaining rootprivileges, another thing that Joe can do is switch identities. As oneexample, to perform administrative tasks, Joe may use “su help” or “sudatabase-admin” to become (respectively) the help user or thedatabase-admin user on a system. He may also connect from one machine toanother, potentially changing identities along the way (e.g., logging inas joe.smith at a first console, and connecting to a database server asdatabase-admin). When he's completed various administrative tasks, Joecan relinquish his root privileges by closing out of any additionalshells created, reverting back to a shell created for user joe.smith.

While there are many legitimate reasons for Joe to change his identitythroughout the day, such changes may also correspond to nefariousactivity. Joe himself may be nefarious, or Joe's account (joe.smith) mayhave been compromised by a third party (whether an “outsider” outside ofACME's network, or an “insider”). Using techniques described herein, thebehavior of users of the environment can be tracked (including acrossmultiple accounts and/or multiple machines) and modeled (e.g., usingvarious graphs described herein). Such models can be used to generatealerts (e.g., to anomalous user behavior). Such models can also be usedforensically, e.g., helping an investigator visualize various aspects ofa network and activities that have occurred, and to attribute particulartypes of actions (e.g., network connections or file accesses) tospecific users.

In a typical day in a datacenter, a user (e.g., Joe Smith) will log in,run various processes, and (optionally) log out. The user will typicallylog in from the same set of IP addresses, from IP addresses within thesame geographical area (e.g., city or country), or from historicallyknown IP addresses/geographical areas (i.e., ones the user haspreviously/occasionally used). A deviation from the user's typical (orhistorical) behavior indicates a change in login behavior. However, itdoes not necessarily mean that a breach has occurred. Once logged into adatacenter, a user may take a variety of actions. As a first example, auser might execute a binary/script. Such binary/script might communicatewith other nodes in the datacenter, or outside of the datacenter, andtransfer data to the user (e.g., executing “curl” to obtain data from aservice external to the datacenter). As a second example, the user cansimilarly transfer data (e.g., out of the datacenter), such as by usingPOST. As a third example, a user might change privilege (one or moretimes), at which point the user can send/receive data as per above. As afourth example, a user might connect to a different machine within thedatacenter (one or more times), at which point the user can send/receivedata as per the above.

In various embodiments, the above information associated with userbehavior is broken into four tiers. The tiers represent example types ofinformation that platform 102 can use in modeling user behavior:

1. The user's entry point (e.g., domains, IP addresses, and/orgeolocation information such as country/city) from which a user logs in.

2. The login user and machine class.

3. Binaries, executables, processes, etc. a user launches.

4. Internal servers with which the user (or any of the user's processes,child processes, etc.) communicates, and external contacts (e.g.,domains, IP addresses, and/or geolocation information such ascountry/city) with which the user communicates (i.e., transfers data).

In the event of a security breach, being able to concretely answerquestions about such information can be very important. And,collectively, such information is useful in providing an end-to-end path(e.g., for performing investigations).

In the following example, suppose a user (“UserA”) logs into a machine(“Machine01”) from a first IP address (“IP01”). Machine01 is inside adatacenter. UserA then launches a script (“runnable.sh”) on Machine01.From Machine01, UserA next logs into a second machine (“Machine02”) viassh, also as UserA, also within the datacenter. On Machine02, UserAagain launches a script (“new_runnable.sh”). On Machine02, UserA thenchanges privilege, becoming root on Machine02. From Machine02, UserA(now as root) logs into a third machine (“Machine03”) in the datacentervia ssh, as root on Machine03. As root on Machine03, the user executes ascript (“collect_data.sh”) on Machine03. The script internallycommunicates (as root) to a MySQL-based service internal to thedatacenter, and downloads data from the MySQL-based service. Finally, asroot on Machine03, the user externally communicates with a serveroutside the datacenter (“External01”), using a POST command. Tosummarize what has occurred, in this example, the source/entry point isIP01. Data is transferred to an external server External01. The machineperforming the transfer to External01 is Machine03. The usertransferring the data is “root” (on Machine03), while the actual user(hiding behind root) is UserA.

In the above scenario, the “original user” (ultimately responsible fortransmitting data to External01) is UserA, who logged in from IP01. Eachof the processes ultimately started by UserA, whether started at thecommand line (tty) such as “runnable.sh” or started after an sshconnection such as “new_runnable.sh,” and whether as UserA, or as asubsequent identity, are all examples of child processes which can bearranged into a process hierarchy.

As previously mentioned, machines can be clustered together logicallyinto machine clusters. One approach to clustering is to classifymachines based on information such as the types of services theyprovide/binaries they have installed upon them/processes they execute.Machines sharing a given machine class (as they share commonbinaries/services/etc.) will behave similarly to one another. Eachmachine in a datacenter can be assigned to a machine cluster, and eachmachine cluster can be assigned an identifier (also referred to hereinas a machine class). One or more tags can also be assigned to a givenmachine class (e.g., database_servers_west or prod_web_frontend). Oneapproach to assigning a tag to a machine class is to apply termfrequency analysis (e.g., TF/IDF) to the applications run by a givenmachine class, selecting as tags those most unique to the class.Platform 102 can use behavioral baselines taken for a class of machinesto identify deviations from the baseline (e.g., by a particular machinein the class).

FIG. 26 illustrates an example of a process for detecting anomalies. Invarious embodiments, process 2600 is performed by platform 102. Asexplained above, a given session will have an original user. And, eachaction taken by the original user can be tied back to the original user,despite privilege changes and/or lateral movement throughout adatacenter. Process 2600 begins at 2602 when log data associated with auser session (and thus an original user) is received. At 2604, a logicalgraph is generated, using at least a portion of the collected data. Whenan anomaly is detected (2606), it can be recorded, and as applicable, analert is generated (2608). The following are examples of graphs that canbe generated (e.g., at 2604), with corresponding examples of anomaliesthat can be detected (e.g., at 2606) and alerted upon (e.g., at 2608).

A. Insider Behavior Graph

FIG. 27A illustrates a representation of an embodiment of an insiderbehavior graph. In the example of FIG. 27A, each node in the graph canbe: (1) a cluster of users; (2) a cluster of launched processes; (3) acluster of processes/servers running on a machine class; (4) a clusterof external IP addresses (of incoming clients); or (5) a cluster ofexternal servers based on DNS/IP/etc. As depicted in FIG. 27A, graphdata is vertically tiered into four tiers. Tier 0 (2752) corresponds toentry point information (e.g., domains, IP addresses, and/or geolocationinformation) associated with a client entering the datacenter from anexternal entry point. Entry points are clustered together based on suchinformation. Tier 1 (2754) corresponds to a user on a machine class,with a given user on a given machine class represented as a node. Tier 2(2756) corresponds to launched processes, child processes, and/orinteractive processes. Processes for a given user and having similarconnectivity (e.g., sharing the processes they launch and the machineswith which they communicate) are grouped into nodes. Finally, Tier 3(2758) corresponds to the services/servers/domains/IP addresses withwhich processes communicate. A relationship between the tiers can bestated as follows: Tier 0 nodes log in to tier 1 nodes. Tier 1 nodeslaunch tier 2 nodes. Tier 2 nodes connect to tier 3 nodes.

The inclusion of an original user in both Tier 1 and Tier 2 allows forhorizontal tiering. Such horizontal tiering ensures that there is nooverlap between any two users in Tier 1 and Tier 2. Such lack of overlapprovides for faster searching of an end-to-end path (e.g., one startingwith a Tier 0 node and terminating at a Tier 3 node). Horizontal tieringalso helps in establishing baseline insider behavior. For example, bybuilding an hourly insider behavior graph, new edges/changes in edgesbetween nodes in Tier 1 and Tier 2 can be identified. Any such changescorrespond to a change associated with the original user. And, any suchchanges can be surfaced as anomalous and alerts can be generated.

As explained above, Tier 1 corresponds to a user (e.g., user “U”)logging into a machine having a particular machine class (e.g., machineclass “M”). Tier 2 is a cluster of processes having command linesimilarity (e.g., CType “C”), having an original user “U,” and runningas a particular effective user (e.g., user “U1”). The value of U1 may bethe same as U (e.g., joe.smith in both cases), or the value of U1 may bedifferent (e.g., U=joe.smith and U1=root). Thus, while an edge may bepresent from a Tier 1 node to a Tier 2 node, the effective user in theTier 2 node may or may not match the original user (while the originaluser in the Tier 2 node will match the original user in the Tier 1node).

As a reminder, a change from a user U into a user U1 can take place in avariety of ways. Examples include where U becomes U1 on the same machine(e.g., via su), and also where U sshes to other machine(s). In bothsituations, U can perform multiple changes, and can combine approaches.For example, U can become U1 on a first machine, ssh to a second machine(as U1), become U2 on the second machine, and ssh to a third machine(whether as user U2 or user U3). In various embodiments, the complexityof how user U ultimately becomes U3 (or U5, etc.) is hidden from aviewer of an insider behavior graph, and only an original user (e.g., U)and the effective user of a given node (e.g., U5) are depicted. Asapplicable (e.g., if desired by a viewer of the insider behavior graph),additional detail about the path (e.g., an end-to-end path of edges fromuser U to user U5) can be surfaced (e.g., via user interactions withnodes).

FIG. 27B illustrates an example of a portion of an insider behaviorgraph (e.g., as rendered in a web browser). In the example shown, node2702 (the external IP address, 52.32.40.231) is an example of a Tier 0node, and represents an entry point into a datacenter. As indicated bydirectional arrows 2704 and 2706, two users, “aruneli_prod” and“harish_prod,” both made use of the source IP 52.32.40.231 when loggingin between 5 pm and 6 pm on Sunday July 30 (2708). Nodes 2710 and 2712are examples of Tier 1 nodes, having aruneli_prod and harish_prod asassociated respective original users. As previously mentioned, Tier 1nodes correspond to a combination of a user and a machine class. In theexample depicted in FIG. 27B, the machine class associated with nodes2710 and 2712 is hidden from view to simplify visualization, but can besurfaced to a viewer of interface 2700 (e.g., when the user clicks onnode 2710 or 2712).

Nodes 2720-2738 are examples of Tier 2 nodes—processes that are launchedby users in Tier 1 and their child, grandchild, etc. processes. Notethat also depicted in FIG. 27B is a Tier 1 node 2714 that corresponds toa user, “root,” that logged in to a machine cluster from within thedatacenter (i.e., has an entry point within the datacenter). Nodes2742-2744 are examples of Tier 3 nodes—internal/external IP addresses,servers, etc., with which Tier 2 nodes communicate.

In the example shown in FIG. 27B, a viewer of interface 2700 has clickedon node 2738. As indicated in region 2746, the user running the marathoncontainer is “root.” However, by following the directional arrows in thegraph backwards from node 2738 (i.e. from right to left), the viewer candetermine that the original user, responsible for node 2738, is“aruneli_prod,” who logged into the datacenter from IP 52.32.40.231.

The following are examples of changes that can be tracked using aninsider behavior graph model:

A user logs in from a new IP address.

A user logs in from a geolocation not previously used by that user.

A user logs into a new machine class.

A user launches a process not previously used by that user.

A user connects to an internal server to which the user has notpreviously connected.

An original user communicates with an external server (or externalserver known to be malicious) with which that user has not previouslycommunicated.

A user communicates with an external server which has a geolocation notpreviously used by that user.

Such changes can be surfaced as alerts, e.g., to help an administratordetermine when/what anomalous behavior occurs within a datacenter.Further, the behavior graph model can be used (e.g., during forensicanalysis) to answer questions helpful during an investigation. Examplesof such questions include:

Was there any new login activity (Tier 0) in the timeframe beinginvestigated? As one example, has a user logged in from an IP addresswith unknown geolocation information? Similarly, has a user startedcommunicating externally with a new Tier 3 node (e.g., one with unknowngeolocation information).

Has there been any suspicious login activity (Tier 0) in the timeframebeing investigated? As one example, has a user logged in from an IPaddress that corresponds to a known bad IP address as maintained byThreatAggr 150? Similarly, has there been any suspicious Tier 3activity?

Were any anomalous connections made within the datacenter during thetimeframe being investigated? As one example, suppose a given user(“Frank”) typically enters a datacenter from a particular IP address (orrange of IP addresses), and then connects to a first machine type (e.g.,bastion), and then to a second machine type (e.g., database_prod). IfFrank has directly connected to database_prod (instead of first goingthrough bastion) during the timeframe, this can be surfaced using theinsider graph.

Who is (the original user) responsible for running a particular process?

Example—Data Exfiltration

An example of an insider behavior graph being used in an investigationis depicted in FIGS. 28A and 28B. FIG. 28A depicts a baseline ofbehavior for a user, “Bill.” As shown in FIG. 28A, Bill typically logsinto a datacenter from the IP address, 71.198.44.40 (2802). He typicallymakes use of ssh (2804), and sudo (2806), makes use of a set of typicalapplications (2808) and connects (as root) with the external service,api.lacework.net (2810).

Suppose Bill's credentials are compromised by a nefarious outsider(“Eve”). FIG. 28B depicts an embodiment of how the graph depicted inFIG. 28A would appear once Eve begins exfiltrating data from thedatacenter. Eve logs into the datacenter (using Bill's credentials) from52.5.66.8 (2852). As Bill, Eve escalates her privilege to root (e.g.,via su), and then becomes a different user, Alex (e.g., via su alex). AsAlex, Eve executes a script, “sneak.sh” (2854), which launches anotherscript, “post.sh” (2856), which contacts external server 2858 which hasan IP address of 52.5.66.7, and transmits data to it. Edges 2860-2866each represent changes in Bill's behavior. As previously mentioned, suchchanges can be detected as anomalies and associated alerts can begenerated. As a first example, Bill logging in from an IP address he hasnot previously logged in from (2860) can generate an alert. As a secondexample, while Bill does typically make use of sudo (2806), he has notpreviously executed sneak.sh (2854) or post.sh (2856) and the executionof those scripts can generate alerts as well. As a third example, Billhas not previously communicated with server 2858, and an alert can begenerated when he does so (2866). Considered individually, each of edges2860-2866 may indicate nefarious behavior, or may be benign. As anexample of a benign edge, suppose Bill begins working from a home officetwo days a week. The first time he logs in from his home office (i.e.,from an IP address that is not 71.198.44.40), an alert can be generatedthat he has logged in from a new location. Over time, however, as Billcontinues to log in from his home office but otherwise engages intypical activities, Bill's graph will evolve to include logins from both71.198.44.40 and his home office as baseline behavior. Similarly, ifBill begins using a new tool in his job, an alert can be generated thefirst time he executes the tool, but over time will become part of hisbaseline.

In some cases, a single edge can indicate a serious threat. For example,if server 2852 (or 2858) is included in a known bad IP listing, edge2860 (or 2866) indicates compromise. An alert that includes anappropriate severity level (e.g., “threat level high”) can be generated.In other cases, a combination of edges could indicate a threat (where asingle edge might otherwise result in a lesser warning). In the exampleshown in FIG. 28B, the presence of multiple new edges is indicative of aserious threat. Of note, even though “sneak.sh” and “post.sh” wereexecuted by Alex, because platform 102 also keeps track of an originaluser, the compromise of Bob's account will be discovered.

B. User Login Graph

FIG. 29 illustrates a representation of an embodiment of a user logingraph. In the example of FIG. 29, tier 0 (2902) clusters source IPaddresses as belonging to a particular country (including an “unknown”country) or as a known bad IP. Tier 1 (2904) clusters user logins, andtier 2 (2906) clusters type of machine class into which a user islogging in. The user login graph tracks the typical login behavior ofusers. By interacting with a representation of the graph, answers toquestions such as the following can be obtained:

Where is a user logging in from?

Have any users logged in from a known bad address?

Have any non-developer users accessed development machines?

Which machines does a particular user access?

Examples of alerts that can be generated using the user login graphinclude:

A user logs in from a known bad IP address.

A user logs in from a new country for the first time.

A new user logs into the datacenter for the first time.

A user accesses a machine class that the user has not previouslyaccessed.

C. Privilege Change Graph

One way to track privilege changes in a datacenter is by monitoring aprocess hierarchy of processes. To help filter out noisycommands/processes such as “su-u,” the hierarchy of processes can beconstrained to those associated with network activity. In a *nix system,each process has two identifiers assigned to it, a process identifier(PID) and a parent process identifier (PPID). When such a system starts,the initial process is assigned a PID 0. Each user process has acorresponding parent process.

FIG. 30 illustrates a representation of a process tree. In the exampleshown in FIG. 30, PIDs have been replaced with an effective user runninga given process. Thus, a designation of “root” (3002) indicates the userrunning the process is root, and a designation of “avahi” (3004)indicates the user running the process is avahi. Further, in the exampleshown in FIG. 30, processes depicted to the right of other processes arechild processes. In line 3006, the user avahi became root and ran theprocess “padae_run,” whose parent is “avahi-daemon.” This represents aprivilege change (from avahi to root).

Using techniques described herein, a graph can be constructed (alsoreferred to herein as a privilege change graph) which models privilegechanges. In particular, a graph can be constructed which identifieswhere a process P1 launches a process P2, where P1 and P2 each have anassociated user U1 and U2, with U1 being an original user, and U2 beingan effective user. In the graph, each node is a cluster of processes(sharing a CType) executed by a particular (original) user. As all theprocesses in the cluster belong to the same user, a label that can beused for the cluster is the user's username. An edge in the graph, froma first node to a second node, indicates that a user of the first nodechanged its privilege to the user of the second node.

FIG. 31 illustrates an example of a privilege change graph. In theexample shown in FIG. 31, each node (e.g., nodes 3102 and 3104)represents a user. Privilege changes are indicated by edges, such asedge 3106.

As with other graphs, anomalies in graph 3100 can be used to generatealerts.

Three examples of such alerts are as follows:

New user entering the datacenter. Any time a new user enters thedatacenter and runs a process, the graph will show a new node, with anew CType. This indicates a new user has been detected within thedatacenter. FIG. 31 is a representation of an example of an interfacethat depicts such an alert. Specifically, as indicated in region 3108,an alert for the time period 1 pm-2 pm on June 8 was generated. Thealert identifies that a new user, Bill (3110) executed a process.

Privilege change. As explained above, a new edge, from a first node(user A) to a second node (user B) indicates that user A has changedprivilege to user B.

Privilege escalation. Privilege escalation is a particular case ofprivilege change, in which the first user becomes root.

An example of an anomalous privilege change and an example of ananomalous privilege escalation are each depicted in graph 3200 of FIG.32. In particular, as indicated in region 3202, two alerts for the timeperiod 2 pm-3 pm on June 8 were generated (corresponding to thedetection of the two anomalous events). In region 3204, root has changedprivilege to the user “daemon,” which root has not previously done. Thisanomaly is indicated to the user by highlighting the daemon node (e.g.,outlining it in the color red). As indicated by edge 3206, Bill hasescalated his privilege to the user root (which can similarly behighlighted in region 3208). This action by Bill represents a privilegeescalation.

V. Extensible Query Interface for Dynamic Data Compositions and FilterApplications

As described throughout this Specification, datacenters are highlydynamic environments. And, different customers of platform 102 (e.g.,ACME vs. BETA) may have different/disparate needs/requirements ofplatform 102, e.g., due to having different types of assets, differentapplications, etc. Further, as time progresses, new software tools willbe developed, new types of anomalous behavior will be possible (andshould be detectable), etc. In various embodiments, platform 102 makesuse of predefined relational schema (including by having differentpredefined relational schema for different customers). However, thecomplexity and cost of maintaining/updating such predefined relationalschema can rapidly become problematic—particularly where the schemaincludes a mix of relational, nested, and hierarchical (graph) datasets.In other embodiments, the data models and filtering applications used byplatform 102 are extensible. As will be described in more detail below,in various embodiments, platform 102 supports dynamic query generationby automatic discovery of join relations via static or dynamic filteringkey specifications among composable data sets. This allows a user ofplatform 102 to be agnostic to modifications made to existing data setsas well as creation of new data sets. The extensible query interfacealso provides a declarative and configurable specification foroptimizing internal data generation and derivations.

As will also be described in more detail below, platform 102 isconfigured to dynamically translate user interactions (e.g., receivedvia web 120) into SQL queries (and without the user needing to know howto write queries). Such queries can then be performed (e.g., by queryservice 166) against any compatible backend (e.g., database 142).

A. Visualization Examples

FIG. 33 illustrates an example of a user interacting with a portion ofan interface. When a user visits platform 102 (e.g., via web app 120using a browser), data is extracted from database 142 as needed (e.g.,by query service 166), to provide the user with information, such as thevisualizations depicted variously throughout the Specification (e.g., inFIGS. 9 and 33). As the user continues to interact with suchvisualizations (e.g., clicking on graph nodes, entering text into searchboxes, navigating between tabs (e.g., tab 3302 vs. 3322)), suchinteractions act as triggers that cause query service 166 to continue toobtain information from database 142 as needed (and as described in moredetail below).

In the example shown in FIG. 33, ACME administrator Alice is viewing adashboard that provides various information about ACME users (3302),during the time period March 2 at midnight-March 25 at 7 pm (which sheselected by interacting with region 3304). Various statisticalinformation is presented to Alice in region 3306. Region 3308 presents atimeline of events that occurred during the selected time period. Alicehas opted to list only the critical, high, and medium events during thetime period by clicking on the associated boxes (3310-3314). A total of55 low severity, and 155 info-only events also occurred during the timeperiod. Each time Alice interacts with an element in FIG. 33 (e.g.,clicks on box 3314, clicks on link 3320, or clicks on tab 3322), heractions are translated/formalized into filters on the data set and usedto dynamically generate SQL queries. The SQL queries are generatedtransparently to Alice (and also to a designer of the user interfaceshown in FIG. 33).

Alice notes in the timeline (3316) that a user, Harish, connected to aknown bad server (examplebad.com) using wget, an event that has acritical severity level. Alice can click on region 3318 to expanddetails about the event inline (which will display, for example, thetext “External connection made to known bad host examplebad.com at port80 from application ‘wget’ running on host dev1.lacework.internal asuser harish”) directly below line 3316. Alice can also click on region3320, which will take her to a dossier for the event (depicted in FIG.34). As will be described in more detail below, a dossier is a templatefor a collection of visualizations.

As shown in interface 3400, the event of Harish using wget to contactexamplebad.com on March 16 was assigned an event ID of 9291 by platform102 (3402). For convenience to Alice, the event is also added to herdashboard in region 3420 as a bookmark (3404). A summary of the event isdepicted in region 3406. By interacting with boxes shown in region 3408,Alice can see a timeline of related events. In this case, Alice hasindicated that she would like to see other events involving the wgetapplication (by clicking box 3410). Events of critical and mediumsecurity involving wget occurred during the one hour window selected inregion 3412.

Region 3414 automatically provides Alice with answers to questions thatmay be helpful to have answers to while investigating event 9291. IfAlice clicks on any of the links in the event description (3416), shewill be taken to a corresponding dossier for the link. As one example,suppose Alice clicks on link 3418. She will then be presented withinterface 3500 shown in FIG. 35.

Interface 3500 is an embodiment of a dossier for a domain. In thisexample, the domain is “examplebad.com,” as shown in region 3502.Suppose Alice would like to track down more information aboutinteractions ACME resources have made with examplebad.com betweenJanuary 1 and March 20. She selects the appropriate time period inregion 3504 and information in the other portions of interface 3500automatically update to provide various information corresponding to theselected time frame. As one example, Alice can see that contact was madewith examplebad.com a total of 17 times during the time period (3506),as well as a list of each contact (3508). Various statisticalinformation is also included in the dossier for the time period (3510).If she scrolls down in interface 3500, Alice will be able to viewvarious polygraphs associated with examplebad.com, such as anapplication-communication polygraph (3512).

B. Query Service Data Model

Data stored in database 142 can be internally organized as an activitygraph. In the activity graph, nodes are also referred to as Entities.Activities generated by Entities are modeled as directional edgesbetween nodes. Thus, each edge is an activity between two Entities. Oneexample of an Activity is a “login” Activity, in which a user Entitylogs into a machine Entity (with a directed edge from the user to themachine). A second example of an Activity is a “launch” Activity, inwhich a parent process launches a child process (with a directed edgefrom the parent to the child). A third example of an Activity is a “DNSquery” Activity, in which either a process or a machine performs a query(with a directed edge from the requestor to the answer, e.g., an edgefrom a process to www.example.com). A fourth example of an Activity is anetwork “connected to” Activity, in which processes, IP addresses, andlisten ports can connect to each other (with a directed edge from theinitiator to the server).

As will be described in more detail below, query service 166 provideseither relational views or graph views on top of data stored in database142. Typically, a user will to see want to see data filtered using theactivity graph. For example, if an entity was not involved in anactivity in a given time period, that entity should be filtered out ofquery results. Thus, a request to show “all machines” in a given timeframe will be interpreted as “show distinct machines that were active”during the time frame.

Query service 166 relies on three main data model elements: fields,entities, and filters. As used herein, a field is a collection of valueswith the same type (logical and physical). A field can be represented ina variety of ways, including: 1. a column of relations (table/view), 2.a return field from another entity, 3. an SQL aggregation (e.g., COUNT,SUM, etc.), 4. an SQL expression with the references of other fieldsspecified, and 5. a nested field of a JSON object. As viewed by queryservice 166, an entity is a collection of fields that describe a dataset. The data set can be composed in a variety of ways, including: 1. arelational table, 2. a parameterized SQL statement, 3. DynamicSQLcreated by a Java function, and 4. join/project/aggregate/subclass ofother entities. Some fields are common for all entities. One example ofsuch a field is a “first observed” timestamp (when first use of theentity was detected). A second example of such a field is the entityclassification type (e.g., one of: 1. Machine (on which an agent isinstalled), 2. Process, 3. Binary, 4. UID, 5. IP, 6. DNS Information, 7.ListenPort, and 8. PType). A third example of such a field is a “lastobserved” timestamp.

A filter is an operator that: 1. takes an entity and field values asinputs, 2. a valid SQL expression with specific reference(s) of entityfields, or 3. is a conjunct/disjunct of filters. As will be described inmore detail below, filters can be used to filter data in various ways,and limit data returned by query service 166 without changing theassociated data set.

1. Cards

As mentioned above, a dossier is a template for a collection ofvisualizations. Each visualization (e.g., the box including chart 3514)has a corresponding card, which identifies particular target informationneeded (e.g., from database 142) to generate the visualization. Invarious embodiments, platform 102 maintains a global set ofdossiers/cards. Users of platform 102 such as Alice can build their owndashboard interfaces using preexisting dossiers/cards as components,and/or they can make use of a default dashboard (which incorporatesvarious of such dossiers/cards).

a. Card Specification

A JSON file can be used to store multiple cards (e.g., as part of aquery service catalog). A particular card is represented by a singleJSON object with a unique name as a field name. For example:

{

-   -   “Card1”: {        -   . . .    -   },    -   “Card2”: {        -   . . .    -   }

}

Each card is described by the following named fields:

TYPE: the type of the card. Example values include:

Entity (the default type)

SQL

Filters

DynamicSQL

GraphFilter

Graph

Function

Template

PARAMETERS: a JSON array object that contains an array of parameterobjects with the following fields:

name (the name of the parameter)

required (a Boolean flag indicating whether the parameter is required ornot)

default (a default value of the parameter)

props (a generic JSON object for properties of the parameter. Possiblevalues are: “utype” (a user defined type), and “scope” (an optionalproperty to configure a namespace of the parameter))

value (a value for the parameter—non-null to override the default valuedefined in nested source entities)

SOURCES: a JSON array object explicitly specifying references of inputentities. Each source reference has the following attributes:

name (the card/entity name or fully-qualified Table name)

type (required for base Table entity)

alias (an alias to access this source entity in other fields (e.g.,returns, filters, groups, etc))

RETURNS: a required JSON array object of a return field object. A returnfield object can be described by the following attributes:

field (a valid field name from a source entity)

expr (a valid SQL scalar expression. References to input fields ofsource entities are specified in the format of #{Entity.Field}.Parameters can also be used in the expression in the format of ${ParameterName})

type (the type of field, which is required for return fields specifiedby expr. It is also required for all return fields of an Entity with anSQL type)

alias (the unique alias for return field)

aggr (possible aggregations are: COUNT, COUNT_DISTINCT, DISTINCT, MAX,MIN, AVG, SUM, FIRST_VALUE, LAST_VALUE)

case (JSON array object represents conditional expressions “when” and“expr”)

fieldsFrom, and, except (specification for projections from a sourceentity with excluded fields)

props (general JSON object for properties of the return field. Possibleproperties include: “filterGroup,” “title,” “format,” and “utype”)

PROPS: generic JSON objects for other entity properties

SQL: a JSON array of string literals for SQL statements. Each stringliteral can contain parameterized expressions ${ParameterName} and/orcomposable entity by #{EntityName}

GRAPH: required for Graph entity. Has the following required fields:

source (including “type,” “props,” and “keys”)

target (including “type,” “props,” and “keys”)

edge (including “type” and “props”)

JOINS: a JSON array of join operators. Possible fields for a joinoperator include:

type (possible join types include: “loj”—Left Outer Join, “join”—InnerJoin, “in”—Semi Join, “implicit”—Implicit Join)

left (a left hand side field of join)

right (a right hand side field of join)

keys (key columns for multi-way joins)

order (a join order of multi-way joins)

FKEYS: a JSON array of FilterKey(s). The fields for a FilterKey are:

type (type of FilterKey)

fieldRefs (reference(s) to return fields of an entity defined in thesources field)

alias (an alias of the FilterKey, used in implicit join specification)

FILTERS: a JSON array of filters (conjunct). Possible fields for afilter include:

type (types of filters, including: “eq”—equivalent to SQL=,“ne”—equivalent to SQL< >, “ge”—equivalent to SQL>=, “gt”—equivalent toSQL>, “le”—equivalent to SQL<=, “lt”—equivalent to SQL<,“like”—equivalent to SQL LIKE, “not_like”—equivalent to SQL NOT LIKE,“rlike”—equivalent to SQL RLIKE (Snowflake specific),“not_rlike”—equivalent to SQL NOT RLIKE (Snowflake specific),“in”—equivalent to SQL IN, “not_in”—equivalent to SQL NOT IN)

expr (generic SQL expression)

field (field name)

value (single value)

values (for both IN and NOT IN)

ORDERS: a JSON array of ORDER BY for returning fields. Possibleattributes for the ORDER BY clause include:

field (field ordinal index (1 based) or field alias)

order (asc/desc, default is ascending order)

GROUPS: a JSON array of GROUP BY for returning fields. Field attributesare:

field (ordinal index (1 based) or alias from the return fields)

LIMIT: a limit for the number of records to be returned

OFFSET: an offset of starting position of returned data. Used incombination with limit for pagination.

b. Extensibility Examples

Suppose customers of platform 102 (e.g., ACME and BETA) request new datatransformations or a new aggregation of data from an existing data set(as well as a corresponding visualization for the newly defined dataset). As mentioned above, the data models and filtering applicationsused by platform 102 are extensible. Thus, two example scenarios ofextensibility are (1) extending the filter data set, and (2) extending aFilterKey in the filter data set.

Platform 102 includes a query service catalog that enumerates cardsavailable to users of platform 102. New cards can be included for use inplatform 102 by being added to the query service catalog (e.g., by anoperator of platform 102). For reusability and maintainability, a singleexternal-facing card (e.g., available for use in a dossier) can becomposed of multiple (nested) internal cards. Each newly added card(whether external or internal) will also have associated FilterKey(s)defined. A user interface (UI) developer can then develop avisualization for the new data set in one or more dossier templates. Thesame external card can be used in multiple dossier templates, and agiven external card can be used multiple times in the same dossier(e.g., after customization). Examples of external card customizationinclude customization via parameters, ordering, and/or various mappingsof external data fields (columns).

FIG. 36 illustrates an example of a card specification. The data setassociated with the card shows a list of binary information running byusers within the period of [StartTimeRange (3602), EndTimeRange (3604)].The card depicted in FIG. 36 is implemented by extending an existing(base) card, MVIEW_INTERNAL.ENTITY_VIEW_T (as shown in sources field3606) with explicit filters on ENTITY_TYPE (as shown in filters field3608). It also adds dynamic filters via fkeys PID_KEY (3610) andimplicit join.

The ProcessClusterFilters Entity is a global external filter data setcomprising composable internal data sets (which use the same syntax ascards such as the card depicted in FIG. 36). The ProcessClusterFiltersEntity defines a logical group of entities, the primary purpose of whichis to form the scope of filters. Physical grouping will be determined atruntime by filters provided by users. The filters and grouping arereferred to herein as implicit filters and joins, respectively. Similarto other derived entities, ProcessClusterFilters has the followingstandard JSON fields, with extended definitions:

sources: an array of references to entities. A given reference can beeither a base or a derived entity.

returns: an array of external filter names that represent the schema ofProcessClusterFilters.

fkeys: an array of FilterKey(s).

joins: an array of implicit joins. Each implicit join defines a group ofFilterKey(s) with the same key type. The same FilterKey may be used indifferent join groups.

Returning to FIG. 36, the dynamic application of filters via implicitjoin illustrates that the definition of the card (referred to as“Card189” in the query service catalog) is transparent to future changesin ProcessClusterFilters.

As mentioned above, a second extensibility scenario is one in which aFilterKey in the filter data set is extended (i.e., existing templatefunctions are used to define a new data set). As also mentioned above,data sets used by platform 102 are composable/reusable/extensible,irrespective of whether the data sets are relational or graph data sets.One example data set is the User Tracking polygraph, which is generatedas a graph data set (comprising nodes and edges). Like other polygraphs,User Tracking is an external data set that can be visualized both as agraph (via the nodes and edges) and can also be used as a filter dataset for other cards, via the cluster identifier (CID) field.

An example of this scenario is depicted in FIG. 37, in which three newuser tracking data sets are added as new data sources for theProcessClusterFilters Entity. Corresponding CID fields(UserTrackingIPAddress_CID, UserTrackingUser_CID, andUserTrackingDNSSep_CID) are also added as external filters toProcessClusterFilters. Note that while changes will be made toProcessClusterFilters, due to the extensibility techniques used herein,such changes will not impact card 3600.

2. Generating SQL Queries

As mentioned above, as users such as Alice navigate through/interactwith interfaces provided by platform 102 (e.g., as shown in FIG. 33),such interactions trigger query service 166 to generate and performqueries against database 142. Dynamic composition of filter datasets canbe implemented using FilterKeys and FilterKey Types. A FilterKey can bedefined as a list of columns and/or fields in a nested structure (e.g.,JSON). Instances of the same FilterKey Type can be formed as an ImplicitJoin Group. The same instance of a FilterKey can participate indifferent Implicit Join Groups. A list of relationships among allpossible Implicit Join Groups is represented as a Join Graph for theentire search space to create a final data filter set by traversingedges and producing Join Path(s).

a. Introspection

Each card (e.g., as stored in the query service catalog and used in adossier) can be introspected by a /card/describe/CardID REST request.FIGS. 38 and 39 both depict examples of card schema introspection. Inparticular, FIG. 38 depicts introspection of a non-graph schema, whileFIG. 39 depicts introspection of a graph schema. In both cases, arequest is made (via the REST API) for information pertinent to aparticular card, in accordance with the specified schema, and subject tothe specified filters.

b. Join

At runtime (e.g., whenever it receives a request from web frontend 120),query service 166 parses the list of implicit joins and creates a JoinGraph to manifest relationships of FilterKeys among Entities. A JoinGraph (an example of which is depicted in FIG. 40) comprises a list ofJoin Link(s). A Join Link represents each implicit join group by thesame FilterKey type. A Join Link maintains a reverse map(Entity-to-FilterKey) of FilterKeys and their Entities. As previouslymentioned, Entities can have more than one FilterKey defined. Thereverse map guarantees one FilterKey per Entity can be used for eachJoinLink. Each JoinLink also maintains a list of entities for thepriority order of joins. Each JoinLink is also responsible for creatingand adding directional edge(s) to graphs. An edge represents a possiblejoin between two Entities.

At runtime, each Implicit Join uses the Join Graph to find all possiblejoin paths. The search of possible join paths starts with the outerFilterKey of an implicit join. One approach is to use a shortest pathapproach, with breadth first traversal and subject to the followingcriteria:

Use the priority order list of Join Links for all entities in the sameimplicit join group.

Stop when a node (Entity) is reached which has local filter(s).

Include all join paths at the same level (depth).

Exclude join paths based on the predefined rules (path of edges).

c. Examples

FIG. 41 depicts an example introspection corresponding to the carddepicted in FIG. 36. In particular, in FIG. 41, the card is filtered byan external DNS name. FIG. 42 depicts an example query service log for aJoin Path search (in accordance with the breadth first approachdescribed above) corresponding to FIG. 41. The shortest path isindicated at line 4202. Finally, the SQL generated by query service 166,using the result of the Join Path search, is depicted in FIG. 43. FIG.44 depicts an example introspection corresponding to FIG. 37. Inparticular, in FIG. 44, filtering on Card 189 is performed by the UserTracking cluster. FIG. 45 depicts an example query service log for aJoin Path search corresponding to FIG. 44. Finally, the SQL generated byquery service 166, using the result of the Join Path search, is depictedin FIG. 46. Examples of translating a filter and a join, respectively,to an SQL predicate are depicted in FIGS. 47A and 47B, and in FIGS. 47Cand 47D.

FIG. 48 illustrates an example of a process for dynamically generatingand executing a query. In various embodiments, process 4800 is performedby platform 102. The process begins at 4802 when a request is receivedto filter information associated with activities within a networkenvironment. One example of such a request occurs in response to Aliceclicking on tab 3322. Another example of such a request occurs inresponse to Alice clicking on icon 3320. Yet another example of such arequest occurs in response to Alice clicking on icon 3324 and selecting(e.g., from a dropdown) an option to filter (e.g., include, exclude)based on specific criteria that she provides (e.g., an IP address, ausername, a range of criteria, etc.).

At 4804, a query is generated based on an implicit join. One example ofprocessing that can be performed at 4804 is as follows. As explainedabove, one way dynamic composition of filter datasets can be implementedis by using FilterKeys and FilterKey Types. And, instances of the sameFilterKey Type can be formed as an Implicit Join Group. A Join Graph forthe entire search space can be constructed from a list of allrelationships among all possible Join Groups. And, a final data filterset can be created by traversing edges and producing one or more JoinPaths. Finally, the shortest path in the join paths is used to generatean SQL query string.

One approach to generating an SQL query string is to use a querybuilding library (authored in an appropriate language such as Java).FIG. 49A illustrates a code excerpt of a common interface “sqlGen”(included in various embodiments in the query building library used byquery service 166). An example way that sqlGen can be used inconjunction with process 4800 is as follows. First, a card/entity iscomposed by a list of input cards/entities, where each input cardrecursively is composed by its own list of input cards. This nestedstructure can be visualized as a tree of query blocks(SELECT) instandard SQL constructs. SQL generation can be performed as thetraversal of the tree from root to leaf entities (top-down), calling thesqlGen of each entity. Each entity can be treated as a subclass of theJava class(Entity). An implicit join filter (EntityFilter) isimplemented as a subclass of Entity, similar to the right hand side of aSQL semi-join operator. Unlike the static SQL semi-join construct, it isconditionally and recursively generated even if it is specified in theinput sources of the JSON specification. Another recursive interface canalso be used in conjunction with process 4800, preSQLGen, which isprimarily the entry point for EntityFilter to run a search and generatenested implicit join filters. During preSQLGen recursive invocations,the applicability of implicit join filters is examined and pushed downto its input subquery list. Another top-down traversal, pullUpCachable,can be used to pull up common sub-query blocks, including thosedynamically generated by preSQLGen, such that SELECT statements of thosecacheable blocks are generated only once at top-level WITH clauses. Arecursive interface, sqlWith, is used to generate nested subqueriesinside WITH clauses. The recursive calls of a sqlWith function cangenerate nested WITH clauses as well. An sqlFrom function can be used togenerate SQL FROM clauses by referencing those subquery blocks in theWITH clauses. It also produces INNER/OUTER join operators based on thejoins in the specification. Another recursive interface, sqlWhere, canbe used to generate conjuncts and disjuncts of local predicates andsemi-join predicates based on implicit join transformations. Further,sqlProject, sqlGroupBy, sqlOrderBy, and sqlLimitOffset can respectivelybe used to translate the corresponding directives in JSON spec to SQLSELECT list, GROUP BY, ORDER BY, and LIMIT/OFFSET clauses.

Returning to process 4800, at 4806, the query (generated at 4804) isused to respond to the request. As one example of the processingperformed at 4806, the generated query is used to query database 142 andprovide (e.g., to web app 120) fact data formatted in accordance with aschema (e.g., as associated with a card associated with the requestreceived at 4802).

d. Additional Examples

FIG. 49B illustrates three examples of SQL entities. An SQL entity iscomposable using other entities in its statement, as well as input toother entities.

FIGS. 50A and 50B illustrate, collectively, example portions of anembodiment of a ProcessClusterFilters definition.

FIG. 51 illustrates an example of an introspection corresponding to aProcessClusterFilters request. As mentioned above, introspection can beperformed by a /card/describe/CardID REST request—a dynamic card parsedand created by query service 166. The sources of the request are atarget card (e.g., Card26) and other filter activity cards (e.g.,ProcessActivity) referenced by the fields(ProcessClusterFilters.USERNAME and ProcessClusterFilters.EXE_PATH) inthe filters.

FIG. 52A illustrates an example of a base table card. FIG. 52Billustrates an example of a filter request, and FIG. 52C illustrates anexample of an SQL query (e.g., generated by query service 166 inresponse to the request). FIG. 52D illustrates an additional example ofa filter request, and FIG. 52E illustrates a corresponding dynamicallygenerated SQL query.

FIGS. 53A, 53B, and 53C illustrate, respectively, a card, a request, anda generated SQL query corresponding to a join. FIGS. 53D and 53Eillustrate, respectively, a request and a generated SQL querycorresponding to an explicit filter join.

Although the foregoing embodiments have been described in some detailfor purposes of clarity of understanding, the invention is not limitedto the details provided. There are many alternative ways of implementingthe invention. The disclosed embodiments are illustrative and notrestrictive.

What is claimed is:
 1. A system, comprising: a processor configured to:receive, in response to a user interaction with a graph that comprises aplurality of nodes, wherein at least one node included in the graph isassociated with an activity within a network environment, a request tofilter information associated with activities within the networkenvironment; and in response to receiving the filter request, generate aquery based on an implicit join using a query service, whereingenerating the query includes generating a join graph, and wherein thejoin graph comprises a list of join links; and a memory coupled to theprocessor and configured to provide the processor with instructions. 2.The system of claim 1 wherein the request to filter information isreceived in response to a user clicking on a visual representation of atleast a portion of the graph.
 3. The system of claim 1 wherein therequest to filter information is received in response to a userinteraction with a query field.
 4. The system of claim 1 wherein theprocessor is further configured to perform the generated query against adatabase.
 5. The system of claim 1 wherein a given join link maintains areverse map from an entity to a filter key.
 6. The system of claim 1wherein generating the query includes finding a join path and whereinfinding the join path includes performing a traversal.
 7. The system ofclaim 6 wherein the traversal comprises a breadth first traversal. 8.The system of claim 6 wherein the traversal is performed using apriority order list of join links for all entities sharing an implicitjoin group.
 9. The system of claim 6 wherein the traversal is stoppedwhen a node is reached which has at least one local filter.
 10. Thesystem of claim 1 wherein generating the query includes selecting ashortest path included in a set of join paths.
 11. The system of claim 1wherein the request is associated with target information needed togenerate or update a visualization of at least a portion of the graph.12. A method, comprising: receiving, in response to a user interactionwith a graph that comprises a plurality of nodes, wherein at least onenode included in the graph is associated with an activity within anetwork environment, a request to filter information associated withactivities within the network environment; and in response to receivingthe filter request, generating a query based on an implicit join using aquery service, wherein generating the query includes generating a joingraph, and wherein the join graph comprises a list of join links. 13.The method of claim 12 wherein the request to filter information isreceived in response to a user clicking on a visual representation of atleast a portion of the graph.
 14. The method of claim 12 wherein therequest to filter information is received in response to a userinteraction with a query field.
 15. The method of claim 12 whereingenerating the query includes finding a join path and wherein findingthe join path includes performing a traversal.
 16. The method of claim12 wherein the generated query is performed against a database.
 17. Themethod of claim 12 wherein a given join link maintains a reverse mapfrom an entity to a filter key.
 18. The method of claim 15 wherein thetraversal comprises a breadth first traversal.
 19. The method of claim15 wherein the traversal is performed using a priority order list ofjoin links for all entities sharing an implicit join group.
 20. Themethod of claim 15 wherein the traversal is stopped when a node isreached which has at least one local filter.
 21. The method of claim 12wherein the request is associated with target information needed togenerate or update a visualization of at least a portion of the graph.22. A computer program product embodied in a tangible non-transitorycomputer readable storage medium and comprising computer instructionsfor: receiving, in response to a user interaction with a graph thatcomprises a plurality of nodes, wherein at least one node included inthe graph is associated with an activity within a network environment, arequest to filter information associated with activities within thenetwork environment; and in response to receiving the filter request,generating a query based on an implicit join using a query service,wherein generating the query includes generating a join graph, andwherein the join graph comprises a list of join links.